setToken($token); #$f->enableCache("fs", "/usr/local/apache2/htdocs/flickr/cache/", 300); // Search for most interesting photos of today $photos_interesting = $f->interestingness_getList(NULL, "license", 500); $iter = 1; foreach ((array)$photos_interesting['photo'] as $photo) { // Build image and link tags for each photo if ($photo[license] == 1 || $photo[license] == 2 || $photo[license] == 4 || $photo[license] == 5) { if ($iter % 2 == 1) { echo "\n"; } echo "\n"; if ($iter % 2 == 0) { echo "\n"; } $iter++; } } ?>
"; echo ""; echo "$photo[title]"; echo "
"; switch ($photo[license]) { case 1: echo "Attribution-NonCommercial-ShareAlike License"; break; case 2: echo "Attribution-NonCommercial License"; break; case 4: echo "Attribution License"; break; case 5: echo "Attribution-ShareAlike License"; break; } echo "