Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- // cheque airrors in Kase ....
- $error_reporting=1;
- if ($error_reporting==1)
- {
- ini_set('error_reporting', E_ALL);
- ini_set('display_errors',TRUE);
- }
- // FILL DATA
- $keywords_per_domain = 1;
- $num_of_domain=88;
- $atchy_id="3be027ff447eef96b9b4841bd0b6e96c";
- $logging=1;
- $ssec_db = 'user';
- $user = 'user';
- $password = 'password';
- //CSB CONNECTOR
- $connection = mysql_connect('localhost',$user,$password)
- or die(mysql_error());
- $query = "select domain_id , domain, domain_settings from $ssec_db.csb_domain order by rand()";
- //$query = "select domain_id , domain, domain_settings from $ssec_db.csb_domain limit $num_of_domain";
- $result1 = mysql_query($query,$connection)
- or die(mysql_error());
- $i = 0;
- $whole_array=array();
- $c = 0; $cc = 0; $p = 0;
- while ($permalink=mysql_fetch_array($result1))
- {
- $format_permalink = unserialize($permalink['domain_settings']);
- $query = "select keyword from $ssec_db.csb_domain_keywords where domain_id ={$permalink['domain_id']}";
- echo "{$permalink['domain_id']}. "; flush();
- if ($keywords_per_domain)
- {
- $query .= " order by rand() limit $keywords_per_domain";
- }
- $result2 = mysql_query($query,$connection)
- or die (mysql_error());
- if($result2)
- {
- while($keyword=mysql_fetch_array($result2))
- {
- $k = $keyword['keyword'];
- $keyword['keyword'] = str_replace(' ','-',$keyword['keyword']);
- if($format_permalink['permalink_structure'] == 'default')
- {
- $kw = strtolower($keyword['keyword']);//.".".$format_permalink['permalink_structure'];
- }
- else
- {
- $kw = strtolower($keyword['keyword']).".".$format_permalink['permalink_structure'];
- }
- // $data=$data.$permalink['domain']."/".$kw."*".$k."##";
- $my_urls[] = "http://".$permalink['domain']."/".$kw."###".$k;
- $p++;
- }
- }
- }
- //Let's roll !
- $url = "http://api.atchytools.com/api.php?atchy_id=$atchy_id&logging=$logging";
- $ch = curl_init($url);
- $jsonDataEncoded = json_encode($my_urls);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonDataEncoded);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
- $result = curl_exec($ch);
- echo $result;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement