people_findByUsername($_POST['flickr_user_id']); $pset = $f->photosets_getList($person['id']); foreach($pset['photoset'] as $set) { $skey=array_search('Rang Panchami 2008',$set); if($skey !== false) { $photo_set_id=$set['id']; } } // Get the friendly URL of the user's photos $photos_url = $f->urls_getUserPhotos($person['id']); // Get the user's first 36 public photos $photos = $f->people_getPublicPhotos($person['id'], NULL, 500); $json='{"photos":['; // Loop through the photos and output the json foreach ((array)$photos['photo'] as $photo) { $json=$json.'{"title":"'.$photo['title'].'","src":"'.$f->buildPhotoURL($photo, "Square").'","url":"'.$photos_url.$photo['id'].'","id":"'.$photo['id'].'"},'; } $json=substr($json,0,-1); $json=$json."]}"; echo $json; } } function getMetaData() { $photo_id=getval($_POST['photo_id']); $meta_data=$f->photos_getInfo($photo_id); //write code for description etc. return $meta_data; }