--- Hanuska Ivo <[EMAIL PROTECTED]> wrote:
> I need to know, if there is a possibility to read full contents of
> HTTP request. I know, the response can be sent by header() function.
> But can I get the request of the client for server?

In a way, yes, although most of this information is nicely parsed for you by
the time PHP has its turn. Look in the $_SERVER superglobal for many of the
headers:

print_r($_SERVER);

Most headers (I think all) begin with HTTP, as in $_SERVER['HTTP_USER_AGENT']
for the User-Agent header. The request line itself is broken into the method,
requested resource, and version.

There is also a nice function called apache_request_headers:

http://www.php.net/apache_request_headers

If you're using an older version, this might be called getallheaders.

Hope that helps.

Chris

=====
My Blog
     http://shiflett.org/
HTTP Developer's Handbook
     http://httphandbook.org/
RAMP Training Courses
     http://www.nyphp.org/ramp

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to