Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/drupal/includes/common.inc).

google

Downloading first google image result

How to download an image from google:

def getimageurlfromgoogle(query)
response = Net::HTTP.get_response('ajax.googleapis.com',
URI.encode("/ajax/services/search/images?v=1.0&q=#{query}&as_filetype=png&safe=active"))
JSON.parse(response.body)["responseData"]["results"][0]["url"]
end

The first result is not always the best result!!

Subscribe to RSS - google