$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) ; if (curl_errno($ch)) { print curl_error($ch); } else { curl_close($ch) ; $xml = new SimpleXMLElement($dump); # print '
' ;
# print_r($xml) ;
# print '
' ; $total_images = 0 ; $images = $captions = $links = $heights = $widths = 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'] ; $width = $attrs['width'] ; $height = $attrs['height'] ; $title = $item->title ; if (preg_match("/$username photo/", $title)) { $title = '' ; } $link =$item->link ; $url = preg_replace('/http:\/\/.*\/photos\//', 'http://api.smugmug.com/photos/', $url) ; # preg_match('/(http.*\/)/', $url, $match) ; # $imagepath = $match[0] ; # $url = preg_replace('/http.*\//', '', $url) ; array_push($images,$url) ; array_push($captions,$title) ; array_push($links,$link) ; array_push($widths,$width) ; array_push($heights,$height) ; $total_images++ ; } } print ' '; for ($i = 0; $i < sizeof($images); $i++) { print " $images[$i] $widths[$i] $heights[$i] \n" ; } print "" ; } } else { print "

You are missing an RSS feed.

" ; } ?>