Created
August 27, 2011 14:41
-
-
Save robdehaven/1175466 to your computer and use it in GitHub Desktop.
Flickr List Photosets (coreylib)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php require_once('coreylib.php'); ?> | |
<?php if ($photos = coreylib('http://api.flickr.com/services/rest/?method=flickr.photosets.getList&api_key=[ENTER-API-KEY]&user_id=[ENTER-USER-ID]&format=rest')) { ?> | |
<ul> | |
<?php foreach($photos->get('photosets/photoset') as $photoset) { ?> | |
<a href="http://www.flickr.com/photos/[ENTER-USERNAME]/sets/<?php echo $photoset['id'] ?>"> | |
<img src="http://farm<?php echo $photoset['farm'] ?>.static.flickr.com/<?php echo $photoset['server'] ?>/<?php echo $photoset['primary'] ?>_<?php echo $photoset['secret'] ?>_s.jpg" /><br /> | |
<?php echo $photoset->get('title') ?></a> | |
</a> | |
<?php } ?> | |
</ul> | |
<?php } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment