Re: Is there a way to see the browser's http header when making a request...

From: Date: Tue, 08 Apr 2003 14:32:23 +0000
Subject: Re: Is there a way to see the browser's http header when making a request...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-142870@lists.php.net to get a copy of this message
<?php $headers = apache_request_headers(); foreach ($headers as $header => $value) { echo "$header: $value <br />\n"; } ?> works only for mod_php in apache Scott Fletcher wrote:
Hiya Fellas!! I am wondering if there is a way for me to use the PHP code to see the sample HTTP that the browser send to the webserver. Yea, I can use the phpinfo() function but it doesn't tell me how the data is arranged from the browser. I'll give you an example. -- This is the HTTP for port 80 -- GET /index.html HTTP/1.0 Connection: Keep-Alive User-Agent: Mozilla/2.02Gold (WinNT; I) Host: www.oreilly.com Accept: image/gif, image/x-xbitmap, image/jpeg, image, pjpeg, */* --clip-- This is what hte browser send to the server before sending the HTML & Javascript codes, blah blah. So, what I want to know is how to use the PHP to display the sample (shown above). Because I am trying to figure out the sample HTTP that the browser send using port 443. Thanks! Scott F.


« previous php.general (#142870) next »