Forum Moderators: coopster
// Get host
if ($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]!= ""){
$IP = $HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"];
$proxy = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$host = @gethostbyaddr($HTTP_SERVER_VARS["HTTP_X_FORWARDED_FOR"]);
} else {
$IP = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$host = @gethostbyaddr($HTTP_SERVER_VARS["REMOTE_ADDR"]);
}
Today I see more hits than usual and a lot of lines like:
ie 5.5 Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Host: localhost
I don't understand why "localhost" would be shown as the host instead of the more usual "161.xx.xx.xx", "some.host.example.pl" etc. Would anyone please be able to clarify this for me?
My other tracking system shows the same host as "64.xx.xx.xx".
Many thanks.
[edited by: jatar_k at 12:25 am (utc) on Nov. 18, 2004]
[edit reason] generalized ip [/edit]