Galleries
/* Last updated with phpFlickr 1.3.2
*
* This example file shows you how to call the 100 most recent public
* photos. It parses through them and prints out a link to each of them
* along with the owner's name.
*
* Most of the processing time in this file comes from the 100 calls to
* flickr.people.getInfo. Enabling caching will help a whole lot with
* this as there are many people who post multiple photos at once.
*
* Obviously, you'll want to replace the "
* by Flickr: http://www.flickr.com/services/api/key.gne
*/
require_once(“/home/welsh/public_html/phpFlickr/phpFlickr.php”);
$f = new phpFlickr(“a02d470bc6d6fca63fc2f1a9f2e5605a”);
$f->enableCache(“db”, “mysql://welsh_wrdp1:S0DIXyf8C0Sw@localhost/welsh_wrdp1″);
// Find the NSID of the username inputted via the form
$person = $f->people_findByUsername(“welshmike”);
// 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->photosets_getList($person['id']);
?>
-
// Loop through the photos and output the html
- ‘;
echo “
“;
echo “$photo[title]
foreach ((array)$photos['photoset'] as $photo) {
$pt = "http://farm$photo[farm].static.flickr.com/$photo[server]/$photo[primary]_$photo[secret]_s.jpg";
echo '
“;
$i++;
// If it reaches the sixth photo, insert a line break
}
?>