Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Get Item Thumbnail in Google base List with PHP

Trying to get the gm:thumbnail value using PHP

5:34 am on Jan 16, 2009 (gmt 0)

Junior Member

10+ Year Member

joined:May 26, 2005
votes: 0

This is my first time to write using google base API. What I'd like to do is pick up the details of an item like the Title, ID, Description, original location of the item and the thumbnail.

I got everything except for the thumbnail. Documents says that it is in the gm:thumbnail but I don't know how to use it using PHP. I got the attribute Image_link and tried to cycle to it but I'm not successful.

Here are some parts of the code I used:


$service = new Zend_Gdata_Gbase();

$query = $service->newSnippetQuery();
$query->setParam('bq', "$search_item");
$query->setParam('max-results', 5);
// $query->setParam('category','Products');

$imglink = $entry->getGbaseAttribute("image_link");
foreach($imglink as $imgt) {
echo "<img src=$imgt/> - $imgt <br>";

it shows everything except for the details of the thumbnails.

Any suggestion how can I get this thing done ? I've been reading documents (about Metadata, Zend Gdata, etc.) for a couple days and can't see how I can access the gm:thumbnail details using PHP.

Thanks in advance.