Advertisement
Guest User

Untitled

a guest
Sep 29th, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. <?
  2.  
  3. // cheque airrors in Kase ....
  4. $error_reporting=1;
  5. if ($error_reporting==1)
  6. {
  7. ini_set('error_reporting', E_ALL);
  8. ini_set('display_errors',TRUE);
  9. }
  10. // FILL DATA
  11. $keywords_per_domain = 1;
  12. $num_of_domain=88;
  13. $atchy_id="3be027ff447eef96b9b4841bd0b6e96c";
  14. $logging=1;
  15.  
  16.  
  17.  
  18. $ssec_db = 'user';
  19. $user = 'user';
  20. $password = 'password';
  21. //CSB CONNECTOR
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29. $connection = mysql_connect('localhost',$user,$password)
  30. or die(mysql_error());
  31. $query = "select domain_id , domain, domain_settings from $ssec_db.csb_domain order by rand()";
  32. //$query = "select domain_id , domain, domain_settings from $ssec_db.csb_domain limit $num_of_domain";
  33. $result1 = mysql_query($query,$connection)
  34. or die(mysql_error());
  35. $i = 0;
  36. $whole_array=array();
  37.  
  38. $c = 0; $cc = 0; $p = 0;
  39. while ($permalink=mysql_fetch_array($result1))
  40. {
  41. $format_permalink = unserialize($permalink['domain_settings']);
  42. $query = "select keyword from $ssec_db.csb_domain_keywords where domain_id ={$permalink['domain_id']}";
  43. echo "{$permalink['domain_id']}. "; flush();
  44. if ($keywords_per_domain)
  45. {
  46. $query .= " order by rand() limit $keywords_per_domain";
  47. }
  48. $result2 = mysql_query($query,$connection)
  49. or die (mysql_error());
  50.  
  51. if($result2)
  52. {
  53.  
  54. while($keyword=mysql_fetch_array($result2))
  55. {
  56.  
  57. $k = $keyword['keyword'];
  58. $keyword['keyword'] = str_replace(' ','-',$keyword['keyword']);
  59. if($format_permalink['permalink_structure'] == 'default')
  60. {
  61. $kw = strtolower($keyword['keyword']);//.".".$format_permalink['permalink_structure'];
  62. }
  63. else
  64. {
  65. $kw = strtolower($keyword['keyword']).".".$format_permalink['permalink_structure'];
  66. }
  67.  
  68. // $data=$data.$permalink['domain']."/".$kw."*".$k."##";
  69.  
  70. $my_urls[] = "http://".$permalink['domain']."/".$kw."###".$k;
  71. $p++;
  72.  
  73.  
  74. }
  75. }
  76. }
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91. //Let's roll !
  92. $url = "http://api.atchytools.com/api.php?atchy_id=$atchy_id&logging=$logging";
  93. $ch = curl_init($url);
  94. $jsonDataEncoded = json_encode($my_urls);
  95. curl_setopt($ch, CURLOPT_POST, 1);
  96. curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
  97. curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
  98. $result = curl_exec($ch);
  99. echo $result;
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement