PHP script to get HTTP Request Headers


<?php
$headers = array();
echo "REMOTE_ADDR: ".$_SERVER['REMOTE_ADDR']."<br />";
foreach(array_keys($_SERVER) as $skey)
{
  if(substr($skey, 0, 5) == "HTTP_")
  {
    if ($skey != "HTTP_COOKIE")
    {
      echo $skey.": ".$_SERVER[$skey]."<br />";
    }
  }
}
?>