$value) { # array_push($vars,"$variable=$value") ; #} $base_url = 'http://api.smugmug.com/hack/feed.mg?' ; $full_url = $base_url.join("&",$vars) ; # print "
$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); $images = array(); $captions = 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[2]->attributes() ; $url = $attrs['url'] ; $url = preg_replace('/http:.*\//', '', $url) ; $title = $item->title ; if (preg_match("/$username photo/", $title)) { $title = '' ; } array_push($images,$url) ; array_push($captions,$title) ; } } print ' \n" ; for ($i = 0; $i < sizeof($images); $i++) { print " $images[$i] \n" ; } print "" ; } else { print "

You are missing an RSS feed.

" ; } ?>