php bot to find number of indexed pages in search engines
Posted: Fri Sep 19, 2008 7:28 am
I'm trying to write a bot to query the search engines to see how many pages they have indexed for a particular URL. Can someone tell me why the following code doesn't produce any results?
You can see the bot in action here: http://www.wildfiremarketinggroup.com/A ... ndexed.php
Code: Select all
<?php
$return=file_get_contents("http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=KZD&q=site%3Amsn.com&btnG=Search&meta=");
//Results 1 - 10 of about 36,800,000 from google.com. (0.15 seconds) preg_match("/of about (.*?) from/",$return,$output); $output=$output[1];
echo'Pages indexed for google.com '.$output;
?>