On Tue, August 16, 2005 10:02 am, tg-php@xxxxxxxxxxxxxxxxxxxxxx wrote: > BTW: I made a mistake last time. Apparently with CLI there are > headers. You can use "php -q" to suppress headers when using PHP via CGI has always sent out at least one header. Content-type: text/html -q has always suppressed that. CLI may or may not have sent headers... > CLI. Odd. Not sure I had to do that when I wrote a few CLI scripts > before. Oh well, something to play with another day (don't have time > to check it right now). > > So another thing I may be wrong on.. but a thought.. If you use the > header() command, does it prevent the web server from generating it's > own headers? I believe your header() commands only REPLACE any headers PHP would have sent, but any other headers it's gonna send, it's still gonna send them. > That is, if you send out "<html><body>Something</body></html" does the > web server automatically generate the headers but if you use header() > it uses what PHP generates rather than it's own? > > If so.. can you just do: > header(); > > With nothing in it to suppress headers? I think that will suppress headers... by issuing an ERROR that a required argument is missing :-) > Or can you do something like: > > header("<xml>stuff</xml>"); No. That is not a valid header, for starters. You MIGHT be able to "wipe out" the headers PHP sends by doing something like: header("Content-type:"); //Wipe out Content-type: but I wouldn't cound on it. Sounds to me like the remote server isn't actually using HTTP at all. HTTP without headers is just not HTTP. You may want to write your own "server" in PHP using sockets -- but then you'll need to convince the remote server to connect/use that different "server" you have written. Either connecting on a different port, or to a different domain, or a different URL (maybe) so you can configure your box to use your "server" for these weird requests. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php