Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...

When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Retrieving Flickr Image Details

Zend_Service_Flickr makes it quick and easy to get an image's details based on a given image ID. Just use the getImageDetails() method, as in the following example:

Example 821. Retrieving Flickr Image Details

Once you have a Flickr image ID, it is a simple matter to fetch information about the image:

= new Zend_Service_Flickr('MY_API_KEY');

$image $flickr->getImageDetails($imageId);

"Image ID $imageId is $image->width x $image->height pixels.<br />\n";
"<a href=\"$image->clickUri\">Click for Image</a>\n";

Zend Framework