I'm using phpflickr to retrieve images from Flickr. For some reason photosets_getPhotos doesn't contain the image descriptions and photos_getInfo has to be used instead. However, when I do it slows everything right down.
Here is a function I've made to retrieve an image set and display it in a prettyPhoto list.
function flickrGallery($setId,$ulClass,$prettyPhotoGroup){
$f = new phpFlickr('KEY','SECRET',false); // API
$user = "USERID";
$photoset_id = $setId;
$photos = $f->photosets_getPhotos($photoset_id);
echo "<ul class=\"$ulClass\">\n";
foreach ($photos['photoset']['photo'] as $photo){
$getInfo = $f->photos_getInfo($photo['id']);
$description = $getInfo['photo']['description'];
$urlOrig = $f->buildPhotoURL($photo, "small");
$urlHex = strToHex($urlOrig);
$fullsize = $f->buildPhotoURL($photo, "large");
echo "<li>"
."<a href=\"$fullsize\" rel=\"prettyPhoto[$prettyPhotoGroup]\" title=\"".$description."</pre>\">"
."<img src=\"/thumb/external$urlHex/120/86\" width=\"120\" height=\"80\" class=\"borderoff\" alt=\"".$photo['title']."\" />"
."</a>"
."</li>\n";
}
echo "</ul>\n";
}
Is there a way I can speed things up or an alternative method for getting the image descriptions?