Here is a link to a topic here at PHPBuilder that discussed this previously.
Basically, there's no way to get Apache to output nothing but whatever data you want - it's going to output certain headers no matter what. If you're interested in reducing it as much as possible, however, you could look into using mod_headers to remove headers set, as well as putting the following in your PHP script:
ini_set('default_mimetype', NULL);
I couldn't get Apache to completely remove the Content-Type header, but the above test will at least get rid of any text after it (unless Apache adds its own default).
For example, with a .htaccess file that looks like:
<Files test.php>
Header unset X-Powered-By
Header unset Connection
</Files>
and a test.php that looks like:
<?php
ini_set('default_mimetype', NULL);
header('HTTP/1.1 200 1', true);
echo 'hi';
here's what the HTTP conversation looked like on my local Apache test server:
GET /test.php HTTP/1.0
HTTP/1.1 200 1
Date: Wed, 11 Mar 2009 00:10:09 GMT
Server: Apache
Content-Length: 2
Content-Type:
hi
Note that in my httpd.conf file I had added the following line:
ServerTokens ProductOnly
This makes sure that the 'Server:' header is reduced to simply "Apache" (as you can see).
If that's not enough, you might have to look at using a different webserver (or else modifying Apache's source code and recompiling it).