When PHP works as an Apache module on Windows, you will not see all the headers in the autoglobal $ _SERVER array.
You should get them using apache_request_headers (). You can use some code to deploy a cross platform:
function GetHeader($myheader) { if (isset($_SERVER[$myheader])) { return $_SERVER[$myheader]; } else { $headers = apache_request_headers(); if (isset($headers[$myheader])) { return $headers[$myheader]; } } return ''; }
If PHP is even newer, you can also try getallheaders ().
http://php.net/manual/en/function.getallheaders.php
Ghigo source share