$full_url" ; if ($full_url != '') { $ch=curl_init($full_url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $dump = curl_exec($ch) ; curl_close($ch) ; $xml = new SimpleXMLElement($dump); $total_images = 0 ; $images = $captions = $links = array(); $albumtitle = $xml->channel['title'] ; if (preg_match("/^.+?'s/", $albumtitle)) { $username = preg_replace("/^(.+?'s).+/", "$1", $albumtitle) ; } foreach ($xml->channel->item as $item) { if ($item->link != '') { $media = $item->children('http://search.yahoo.com/mrss/'); $attrs = $media->group->content[3]->attributes() ; $url = $attrs['url'] ; $url = preg_replace('/http:\/\/.*\/photos\//', 'http://api.smugmug.com/photos/', $url) ; $width = $attrs['width'] ; $height = $attrs['height'] ; $title = $item->title ; $link =$item->link ; array_push($images,$url) ; array_push($captions,$title) ; array_push($links,$link) ; $total_images++ ; } } switch (TRUE) { case ($total_images < 10) ; $zoomout = 20 ; break ; case ($total_images >= 10 AND $total_images < 50) ; $zoomout = 10 ; break ; case ($total_images >= 50 ) ; $zoomout = 5 ; break ; } $columns = round(sqrt($total_images)) ; print " \n" ; for ($i = 0; $i < sizeof($images); $i++) { print " \n" ; } print "\n" ; } else { print "

You are missing an RSS feed.

" ; } ?>