bgbs Posted April 16, 2008 Share Posted April 16, 2008 I found this cool script but I want it modified. First the URL, I would like to point to my flickr account so that it can pull pictures from my set only. Right now it pulls any pics from flickrs using tags. I don't need tags. Second thing is that all pics show up in one row, I would like to have Two columns three pics on each column. I dont know how to do that. Any help would be appreciates since this sort of modifaction stuff is over my head. Thanks ahead of time Ben <?php $tags = "sea, sand, caribe, sunshine"; $imageNumber = 6; function getFlickrRSS(){ global $tags, $ids; $url = "http://api.flickr.com/services/feeds/photos_public.gne?format=rss2&tags=".$tags; if ($fp = fopen($url, 'r')) { $content = ''; while ($line = fread($fp, 1024)) { $content .= $line; } } return $content; } function getImages($rssContent){ global $imageNumber; $before = '<media:thumbnail url="'; $after = '"'; $imageList = array(); $oldPos = 0; $startPos=0; do { $oldPos = $startPos; $startPos = strpos($rssContent,$before,$startPos) + strlen($before); $endPos = strpos($rssContent,$after,$startPos); $imageList[] = substr($rssContent,$startPos,$endPos-$startPos); } while (($startPos > $oldPos) && (sizeof($imageList)<$imageNumber)); return $imageList; } $content = getFlickrRSS(); $imageList = getImages($content); ?> Link to comment https://forums.phpfreaks.com/topic/101443-flickr-script-help-please/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.