Utilizza http://www.php.net/print o http://www.php.net/echo e http://www.php.net/header per settare correttamente il content type