Hello, I found some little php code to check google index of any site.
<?php
function checkSite($www)
{
$ch = curl_init('http://www.google.pl/search?hl=pl&q=site%3A'.trim($www).'&btnG=Szukaj&source=hp');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$sHtml = curl_exec($ch);
preg_match('#\<div id=resultStats\>.*([0-9,]+) wynik#Ui', $sHtml, $aMatches);
curl_close($ch);
return (int)str_replace(',', '', $aMatches[1]);
}
echo checkSite('domain.com');
?>
But to check any site I must edit this code and add new site manually. I'm big beginner in PHP.
I want to have a area on browser side to add many sites, and receive result, like in this code which I add. above.
Can anybody help me with this?
PS. Sorry for my poor English.