<?php /**/ ?><?php
header("Content-Type:text/xml");  #note the use of the appropriate HTTP Content-Type header
$url = "http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=e81ef8102a5160154ef4662adcc9046b&tags=puppy&per_page=5";

function getResource($url){
        $chandle = curl_init();
        curl_setopt($chandle, CURLOPT_URL, $url);
        curl_setopt($chandle, CURLOPT_RETURNTRANSFER, 1);
        $result = curl_exec($chandle);
        curl_close($chandle);

        return $result;
}

$feed = getResource($url);
echo $feed;
?>