When I search Chris Brown through api I get these results:
ButinGooglesearchbybrowsertheresultsaredifferent:
Assumptions:
- Throughthesearchinthesite,eventhoughIamnotloggedin,thesearchoccursbasedonsomeadditionalinformationextractedfromthebrowser.Ipandlanguage,forexample...
- ThinkinginthiswayIfiguredtheremightbesomeparametersthatwouldallowmetousetheapiinthesamewayasthebrowser.
DoesanyonehaveadeeperideaofthedifferencesinthesearchforeachandhowcanImakethemthesameorsimilar?
Code:
<?php$query=urlencode('ChrisBrown');$url="http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=".$query;
$body = file_get_contents($url);
$json = json_decode($body);
for($x=0; $x < count($json->responseData->results); $x++){
echo "<b>Resultado ".($x+1)."</b>";
echo "<br>URL: ";
echo $json->responseData->results[$x]->url;
echo "<br>VisibleURL: ";
echo $json->responseData->results[$x]->visibleUrl;
echo "<br>Título: ";
echo $json->responseData->results[$x]->title;
echo "<br><br>";
}
?>