PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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?
<?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;
?>