Google AJAX api
Posted: Tue Sep 14, 2010 8:36 am
I'm using the Google AJAX api to search google from my site, now the code works, the only problem I got is that the estimate amount of results doesn't match with the normal google.
Now, under "estimatedResultCount" I get : "536" and when i search on the normal google, i get 37,000 results.
Am i still doing something wrong? Or is this just normal
Code: Select all
<?php
$apiKey = "ABQIAAAAt4f08-H084X-lC85HC1crxTb-vLQlFZmc2N8bgWI8YDPp5FEVBSak5rhmI-6wfaR89QTNpCOxJ8ZXA";
$url = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=woutr&key=".$apiKey."&userip=".$_SERVER['REMOTE_ADDR'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://localhost:8888");
$body = curl_exec($ch);
curl_close($ch);
echo $body;
?>Am i still doing something wrong? Or is this just normal