JSON & PHP .. Unexpected error!


am trying to use json for live update, on local host works fine, but after uploading to the host am getting errors:

Resource interpreted as Script but transferred with MIME type text/html.
Uncaught SyntaxError: Unexpected token

in my php file am using json_encode, the local php version is 5.2.9, and json version 1.2.1.

on the host php verion 5.2.13, json 1.2.1.

what can the problem !?

function GetData() {
    $.getJSON("http://site.com/get.php?callback=test", null, function(data) {

        if (data != null) {
setInterval(function(){ GetData()  },5000); 


Thanks in advanced for any help !

try this:

header('Content-type: application/json');
echo json_encode($data);

Thats it ??
its works ^^

but no need to add also Access-Control-Allow-Origin ?!?!