Here is a simple solution that fetches shows by name based on the query from Krinkle:
You can get around the same-origin policy by having your server fetch the URL instead of trying to fetch it directly with AJAX and you don't have to use JSONP to do it.
Javascript (jQuery):
function getShowOptionsFromName (name) {
$.ajax({
url: "ajax.php",
method: "GET",
data: {q: name},
dataType: "json"
}).done(function(data){
console.log(data);
});
}
PHP (in file ajax.php):
$q = urlencode($_GET["q"]);
echo file_get_contents("http://www.imdb.com/xml/find?json=1&nr=1&tt=on&q=$q");