I\'ve just switched my scripts to a different server. On the previous server this worked flawlessly, and now that I\'ve switched them to a different server, I can\'t underst
same thing happened to me when using "apache_request_headers()" so i used this code - works perfectly for me to output all the headers:
$value) {
if(strpos($key, 'HTTP_') === 0) {
$headers = str_replace(' ', '-', ucwords(str_replace('_', ' ', strtolower(substr($key, 5)))));
echo $headers." : ". $i[$headers] = $value . "
";
}
}
?>
output example:
Accept : text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding : gzip, deflate
Accept-Language : en-US,en;q=0.5
Cache-Control : max-age=0
Connection : keep-alive
Host : example.com
Referer : https://example.com/
User-Agent : Mozilla/5.0 (Windows NT 6.1; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0