I am not very sure about this, but google still gives good documentation about this.
$url = "https://ajax.googleapis.com/ajax/services/search/images?" . "v=1.0&q=barack%20obama&userip=INSERT-USER-IP"; // sendRequest // note how referer is set manually $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_REFERER, /* Enter the URL of your site here */); $body = curl_exec($ch); curl_close($ch); // now, process the JSON string $json = json_decode($body); // now have some fun with the results...
this is from the official google image search guide. for more information you can have a link to the same here.
https://developers.google.com/image-search/v1/jsondevguide
in $ url you must set the search keywords.
user4247736
source share