Latest
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->people_getPublicPhotos($person['id'], NULL, 40);
// Loop through the photos and output the html
foreach ((array)$photos['photo'] as $photo) {
echo ““;
echo “
"src=" . $f->buildPhotoURL($photo, “Square”) . “>”;
echo ““;
$i++;
// If it reaches the sixth photo, insert a line break
if ($i % 8 == 0) {
echo “
\n”;
}
}
?>