Code
Issues
Pull requests
Actions
Projects
Security
Insights
search-engine-keyword-position-checker-PHP-script/free-google-serp-checker.php
@codingdudecom
codingdudecom Create free-google-serp-checker.php
1 contributor
504 lines (485 sloc) 16.4 KB
";
for ($page = 1;$page <= $pages && $found == false;$page++){
$apiurl = sprintf('https://www.googleapis.com/customsearch/v1?q=%s&cx=%s&key=%s&hl=%s&gl=%s&start=%d',$query,$GOOGLE_CSE_CX,$GOOGLE_API_KEY,$hl,$gl,($page-1)*10+1);
// echo $apiurl;
$json = file_get_contents($apiurl);
// $json = file_get_contents('http://localhost/wordpress/serp-checker/test.json');
$obj = json_decode($json);
foreach ($obj->items as $idx=>$item) {
if (strpos($item->link, $domain) ){
$found = true;
echo "";
} else{
echo " ";
}
echo "".($idx + ($page-1)*10 +1)."";
echo "".$item->htmlTitle."";
echo "".$item->link."▼";
echo "".$item->htmlSnippet."";
echo " ";
}
}
if ($found !== true){
echo "";
echo "".$domain." not found";
echo " ";
}
echo "";
}
?>
XNXX Blogger Template now has an Android APP. Buy it from XNXX Blogger Template . Free and no special permissions needed.