The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other client wants to add images to gallery page Re: client wants to add images to gallery page


This is how to pull images from a users timeline
This could go on your page that you want to pull in the images.

// Create new phpFlickr object
// get api key from here
$f = new phpFlickr("PUT YOUR APIKEY HERE");

// Find the NSID of the username inputted via the form
$person = $f->people_findByUsername('FLICKRUSERNAME');

// Get the friendly URL of the user's photos
$photos_url = $f->urls_getUserPhotos($person);

// Get the user's first 36 public photos
$photos = $f->people_getPublicPhotos($person, NULL, NULL, 18);
// Loop through the photos and output the html
foreach ((array)$photos as $photo) {
echo "
  • buildPhotoURL($photo, "Medium") . ">";
    echo "$photo[title] "src=" . $f->buildPhotoURL($photo, "Square") . " />";
    echo "
  • ";
    //If it reaches the sixth photo, insert a line break