I know how we can use the Google API to return image results in AJAX, but I want to be able to return images for a specific query and then output them in to HTML on my page.

For example:

http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=sausages

Returns results with infomation and images about the top 10 results for the keyword sausages.

How can I query this url to output the images and titles of the images on my page using PHP in HTML.

I am using the following at the top of the function to return the title:

$tit = get_the_title();

Then I am apending it here:

$json = get_url_contents('http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q='.$tit.'');

But it won't recognize the title

Edit
Report