I received about 1,000 queries an hour for the last couple of hours
and I was blocked by google again even after I added the key=###

So how do I get google to allow me to receive more traffic or how do I
remedy the code so it does not block me after a couple thousand
queries?


ERROR =

Warning: file_get_contents(http://www.google.com/base/feeds/
snippets/-/
housing?bq=%5Blocation%3A+%40%22Spokane+Washington%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&key=ABQIAAAA2gq7Hbm8Qq9m7x3WTSSboxQS_tGb29H7YG-
S9HZO4R09DIw8tBTVJS5SH5tWOje_ReWDcqCFfQB9Aw) [function.file-get-
contents]: failed to open stream: HTTP request failed! HTTP/1.0 403
Forbidden in /var/www/vhosts/shortsign.com/httpdocs/results.php on
line 327

LINE 327 =      $sXmlOut = file_get_contents($sXmlUrl);


CODE =


<?
        //## bgn Search GB
----------------------------------------------------------------------------------------------
        include "inc/class.xml.php";
        include "inc/_commonfunctions.php";


        if ($_GET["q"] != ''){
                $sAddress = $_GET["q"];

                if ($_GET['within'] == ''){
                        $sLoc = urlencode('[location: @"'.$sAddress.'" + 
50mi]');
                }else{
                        $sLoc = urlencode('[location: @"'.$sAddress.'" + 
'.$within.'mi]');
                }
        }

if ($priceTo == "")
$priceTo = "999999999";


if ($priceFrom == "")
$priceFrom = "1";


        if ($priceFrom != 0 && $priceTo != 0){
                $price = urlencode("[price: ".$priceFrom."..".$priceTo." USD]");
        }

        $sBathroom = ($sBathroom) ? urlencode("[bathrooms >= ".
$sBathroom."]"):"";
        $sBedroom = ($sBedroom) ? urlencode("[bedrooms >= ".
$sBedroom."]"):"";

        $propertyTypeStr = '';

        if (count($propertyType) == 0){
                $propertyTypeStr = '';
        }else{
                $propertyTypeStr = '[property type:';
                for ($i=0; $i<count($propertyType); $i++) {
                        #echo "$i - $propertyType[$i],"; #
                        if ($i > 1){$propertyTypeStr .= '|';}
                        $propertyTypeStr .= $propertyType[$i];
                }
                $propertyTypeStr .= ']';

        }

        #echo "<hr>Property Type:".$propertyTypeStr."<hr>";
        $propertyTypeStr = urlencode($propertyTypeStr);


        $listingTypeStr = '';

        if (count($listingType) == 0){
                $listingTypeStr = '';
        }else{
                $listingTypeStr = '[listing type:';
                for ($i=0; $i<count($listingType); $i++) {
                        #echo "$i - $listingType[$i],"; #
                        if ($i > 1){$listingTypeStr .= '|';}
                        $listingTypeStr .= $listingType[$i];
                }
                $listingTypeStr .= ']';

        }

        #echo "<h       >listing Type:".$listingTypeStr."<hr>";
        $listingTypeStr = urlencode($listingTypeStr);

        $sFilterUrl = '&q=-propertynet.com';

        if (!$_GET['order'] or $_GET['order']=='price_desc')
                $sOrder = '&orderby='.urlencode('price(float
USD)').'&sortorder=descending';
        elseif ($_GET['order']=='price_asc')
                $sOrder = '&orderby='.urlencode('price(float
USD)').'&sortorder=ascending';

        $iRowsPerPage = 1;//set to 1 so that retrived data is too small
        $sXmlUrl = 'http://www.google.com/base/feeds/snippets/-/housing?'
                                .'bq='. $sLoc.$sPriceRange.$sBathroom.$sBedroom
                                #.urlencode('[image_link]')
                                .$propertyTypeStr
                                .$listingTypeStr
                                .$price
                                .'&max-results=25'
                                .'&start-index='.$startindex.$sFilterUrl.$sOrder
                                
.'&key=ABQIAAAA2gq7Hbm8Qq9m7x3WTSSboxQ...cqCFfQB9Aw';
                                #.'&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);
        $oXml = new XML2Array();
        $aXml = $oXml->ParseXML($sXmlOut);

        $iTotalRows_GB = $TOTALRESULTS = AssignProperty($aXml[0]["children"],
"OPENSEARCH:TOTALRESULTS");

        //## end Search GB
----------------------------------------------------------------------------------------------
?>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" group.
To post to this group, send email to google-help-dataapi@googlegroups.com
To unsubscribe from this group, send email to 
google-help-dataapi+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to