I have the following in my .php file. Just trying a simple search on Flickr. When I visit this .php page in my browser a download dialog pop up. I was expecting to see the json echoed out on the page. I am using WAMP and have url fopen() enabled.If I comment out this code and echo out "WORKING" it does work just fine.
$api_key = "MYKEYHERE";
$tag = 'flower';
$perPage = 25;
$url = 'http://api.flickr.com/services/rest/?method=flickr.photos.search';
$url.= '&api_key='.$api_key;
$url.= '&tags='.$tag;
$url.= '&per_page='.$perPage;
$url.= '&format=json';
$url.= '&nojsoncallback=1';
header('Content-Type:text/json;');
echo file_get_contents($url);
Seems something is wrong somewhere?