Re: Reading all headers sent

From: Date: Fri, 18 Mar 2005 12:14:17 +0000
Subject: Re: Reading all headers sent
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-211037@lists.php.net to get a copy of this message
Jesper Goos wrote:
The $SERVER variable is an array, so try this: <? echo "<pre>"; print_r($_SERVER); echo "</pre>"; ?> regards Jesper martin wrote:
Hi, I wanted to know if there is some way to expose the full headers sent to a php page. I found in google that for windows there is $_SERVER['ALL_HTTP'] to read all the headers sent never seen that one before... maybe only on (crappy) IIS?
but I'm using php on linux/apache.
I don't think PHP exposes any headers "just like that", you need to fetch them in a specific way. As of PHP 5, you can use get_headers(), or with Apache & PHP 4.3.0+, you can use apache_request_headers() and apache_response_headers()
There is any way to get in a variable the full headers sent to a page ? Best regards, MARTIN


« previous php.general (#211037) next »