Devuelve un JSON desde un fichero PHP modificando las cabeceras (header). FROM: http://stackoverflow.com/questions/4064444/returning-json-from-a-php-script#comment52876472_4064468
$data = array("key0" => "value0", "key1" => "value1");
header('Content-type:application/json;charset=utf-8');
echo json_encode($data);