Index: trunk/core/kernel/globals.php =================================================================== diff -u -N -r8605 -r8860 --- trunk/core/kernel/globals.php (.../globals.php) (revision 8605) +++ trunk/core/kernel/globals.php (.../globals.php) (revision 8860) @@ -551,4 +551,28 @@ return ($ip >= $from && $ip <= $to); } } + + function request_headers() + { + if(function_exists("apache_request_headers")) // If apache_request_headers() exists... + { + if($headers = apache_request_headers()) // And works... + { + return $headers; // Use it + } + } + + $headers = array(); + + foreach(array_keys($_SERVER) as $skey) + { + if(substr($skey, 0, 5) == "HTTP_") + { + $headername = str_replace(" ", "-", ucwords(strtolower(str_replace("_", " ", substr($skey, 0, 5))))); + $headers[$headername] = $_SERVER[$skey]; + } + } + + return $headers; + } ?> \ No newline at end of file