//create the new object
$fl = new phpFlickr("{$FLICKR['api_key']}"); #Pass in API Key as param
//get the usercode
$usercode = $fl->people_findByUsername("{$FLICKR['username']}");
$FLICKR['usercode'] = $usercode['id'];
//if you want to cache the query
//$fl->enableCache("db","mysql://");
//get all of the photosets
$fs = $fl->photosets_getList("{$FLICKR['usercode']}"); #Pass in User Id as param (eg. '46573030@N00')
$photos_url = $fl->urls_getUserPhotos("{$FLICKR['usercode']}"); #Pass in User ID as Param (eg. '46573030@N00')
//loop through the photosets
foreach($fs['photoset'] as $ps){
//get photoset meta data
$psi = $fl->photosets_getInfo($ps['id']);
//get primary photo ID
$ps_primary = $fl->photos_getInfo($psi['primary']);
$ps_title = $psi['title'];
$ps_desc = $psi['description'];
$ps_count = $psi['photos'];
//determine which size image to get from flickr for the thumbnail based on the dimensions
if($INDEXTHUMB['width'] <= 75 && $INDEXTHUMB['height'] <= 75){ $_getsize = 'square';}
else
if($INDEXTHUMB['width'] <= 180 && $INDEXTHUMB['height'] <= 180){ $_getsize = 'small';}
else{ $_getsize = 'medium';}
//print out primary with meta data
echo "
";
//echo "
$ps_desc
";
//for looping through the photoset photos
//$photoset = $fl->photosets_getPhotos($ps['id']);
//foreach($photoset['photo'] as $photo){
//echo "
";
//echo "buildPhotoURL($photo, "square") . ">";
//echo "";
//}
}
?>