I also want to note that the script works flawlessly for several thousand queries then I get this error.
On May 20, 10:06 am, CArealtorGuy <[email protected]> wrote: > Well then I am very confused, I am using the above script and I am > able to query a couple thousand time then it errors with this code. > > Warning: file_get_contents(http://www.google.com/base/feeds/snippets/-/ > housing?bq=%5Blocation%3A+%40%22Salt+Lake+City+Utah%22+%2B+5mi%5D > %5Bprice%3A+1..999999999+USD%5D&max-results=25&start-index=1&q=- > propertynet.com&orderby=price%28float+USD%29&sortorder=descending) > [function.file-get-contents]: failed to open stream: HTTP request > failed! HTTP/1.1 403 Forbidden in /var/www/vhosts/domain.com/httpdocs/ > results.php on line 271 > > This is line 271 $sXmlOut = file_get_contents($sXmlUrl); > > On May 19, 10:55 am, Eric Bidelman <[email protected]> wrote: > > > You don't need the Authorization header for the Google Basesnippets feed. > > It's an unauthenticated feed. > > > On Mon, May 18, 2009 at 7:07 PM, CArealtorGuy <[email protected]> wrote: > > > > Hello, > > > > Below is the code that I am using to do my searches on my site but I > > > am not sure where I need to add the authentication string. I would > > > really appreciate any help. > > > > ==== > > > > //## bgn Search for GB Display > > > --------------------------------------------- > > > if ($iRowStart_GB>0) { > > > $sXmlUrl = ' > > >http://www.google.com/base/feeds/snippets/-/housing?' > > > .'bq='. > > > $sLoc.$sPriceRange.$sBathroom.$sBedroom > > > #.urlencode('[image_link]') > > > .$propertyTypeStr > > > .$listingTypeStr > > > .$price > > > .'&max-results='.$iRowLimit_GB > > > > .'&start-index='.$iRowStart_GB.$sFilterUrl.$sOrder; > > > #.'&crowdby=location(text):1'; > > > #&content=geocodes > > > > if ($_GET['show_xml_url']==1) { > > > echo "<hr><a href='".$sXmlUrl."' > > > target=\"_blank\">Google Base > > > Snippet Search</a><hr>"; > > > } > > > > $sXmlOut = file_get_contents($sXmlUrl); > > > //echo '<pre>'.print_r($sXmlOut,1).'</pre>'; > > > $oXml = new XML2Array(); > > > $aXml = $oXml->ParseXML($sXmlOut); > > > > //$iTotalRows_GB = $aXml[0]["children"][10]["tagData"]; > > > $iTotalRows_GB = $TOTALRESULTS = AssignProperty($aXml[0] > > > ["children"], "OPENSEARCH:TOTALRESULTS"); > > > } > > > //## end Search for GB Display > > > --------------------------------------------- > > > > === > > > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Data Protocol" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-help-dataapi?hl=en -~----------~----~----~----~------~----~------~--~---
