Forum Moderators: coopster
PHP provides CGI-style access to the headers through $_SERVER or $_ENV, regardless of whether PHP itself is running as a CGI or server module.
On the inbound side, there's no way of knowing if a request was redirected to you. You could look at the referer header and do some guesswork.
get_headers() is php5 only - when you're at php.net and looking at the functions, under the function name you'll see which versions of php the function is available on.
If it's you who wants to know what the headers are, and not your script who wants to know, get firefox, and install the webdev extension. Under info there's 'view response headers.' I use this all the time, very very handy.