are they all stored in $_server? even custom ones?
+9
A:
Every HTTP request header field is in $_SERVER
(except Cookie
) and the key begins with HTTP_
. If you’re using Apache, you can also try apache_request_headers
.
Gumbo
2009-09-10 06:32:29
A:
Look at the $_SERVER variable to see what it contains. The linked manual page has a lot of useful information, but also simply do a var_dump
on it to see what's actually in it. Many of the entries will or won't be filled in, depending on what the client decides to do, and odd quirks of PHP. Looking at the one on my local server, there is also a $_SERVER["ALL_HTTP"] entries that just lists them all as a string, but apparently this isn't standard, as it isn't listed on the manual page.
notJim
2009-09-10 06:35:22