jQuery JSON Fetch

I am having some trouble fetching some JSON data from a certain feed, namely: http://www.bbc.co.uk/radio1/nowplaying/latest.json
When downloading the contents of the file manually and using it locally, there are no problems, so I can rule out the structuring of the document.

However, calling this in jQuery:


$.getJSON('http://www.bbc.co.uk/radio1/nowplaying/latest.json').error(function(XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.statusText);
});	

returns the text ‘error’ with the status code of 0. Could somebody either, a) verify the results I’m getting or b) suggest where I’m going wrong!

Directly you can’t call different server thru AJAX. To solve this problem.

$.getJSON(‘test.php’).error(function(XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest.statusText);
});

Create test.php in your server, use cURL to retrieve the data from bbc.co.uk and just print it.

<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, “http://www.bbc.co.uk/radio1/nowplaying/latest.json”);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
curl_close($ch);
?>