Get the headers sent from the browser with PHP
I recently needed to be able to see what headers the browser sent to the web server with PHP for testing purposes. This is possible using the apache_request_headers() function but it only works if PHP is run on Apache as a module. This post shows usingapache_request_headers() and also an alternative when PHP is run as a CGI. I believe this second method works for lighttpd but have no idea if it works for IIS.