Hey folks,
I'm hoping someone out there can point me to a function or set of functions that will retrieve header information for an incoming HTTP request, regardless of which web server is being used. I've already found the getallheaders() function, but it seems to only be supported under Apache -- I need to support IIS as well, hence my dilemma. Any help is appreciated!
Thanks,
chris
Obtaining headers on both Apache and IIS
Moderator: General Moderators
Honestly, what I'm looking for is just a raw string that contains the HTTP header information. Doesn't even need to be parsed into an array. 
The purpose is to assist in debugging potentially screwy conditions in the rest of the code, like a "catch all" error condition that just throws back the header information so the administrator might have a better idea of how to reproduce the problem. The server base we'll be installing this on is 50% Windows, 50% Apache -- hence the issue.
Oh well, thanks for confirming my suspicions!
chris
The purpose is to assist in debugging potentially screwy conditions in the rest of the code, like a "catch all" error condition that just throws back the header information so the administrator might have a better idea of how to reproduce the problem. The server base we'll be installing this on is 50% Windows, 50% Apache -- hence the issue.
Oh well, thanks for confirming my suspicions!
chris
Great suggestion! I did a Google search based on this concept and came across this:
http://72.14.253.104/search?q=cache:WlU ... r=&strip=1
(It's a Google cache ... the main page is no longer available.)
It details out how Apache vs IIS tends to fill in the $_SERVER variable at least, which is a starting point.
Thanks for heading me in the right direction!
chris
http://72.14.253.104/search?q=cache:WlU ... r=&strip=1
(It's a Google cache ... the main page is no longer available.)
It details out how Apache vs IIS tends to fill in the $_SERVER variable at least, which is a starting point.
Thanks for heading me in the right direction!
chris