Issue with querry to Google
Posted: Mon Sep 29, 2008 3:05 pm
http://www.wildfiremarketinggroup.com/A ... ndexed.php
The following code does not seem to return the corect data. Is there somethign obvious that I'm mising? Am I passing the querry to Google properly?
Also, once I get this working, I plan to have it display the pages indexed for multiple sites. I was planning to load them into an array from a flat file - is that the right approach? (the array part I have already sorted out thanks to the people here on this forum).
Thanks in advance!
The following code does not seem to return the corect data. Is there somethign obvious that I'm mising? Am I passing the querry to Google properly?
Code: Select all
<?php
$return=file_get_contents("http://www.google.com/search?hl=en&rlz=1T4ADBF_enUS262US262&q=site%3Ahttp%3A%2F%2Fwww.msn.com");
preg_match("/of about (.*?) from/",$return,$output); $output=$output[1];
echo'Pages indexed: '.$output;
?>Thanks in advance!