A while back I found some code that found a clients IP address, at least that is what it was supposed to do.
Code: Select all
function PCF_getIP() {
if ($_SERVER['HTTP_CLIENT_IP'] && strcasecmp($_SERVER['HTTP_CLIENT_IP'], "unknown"))
$ip = $_SERVER['HTTP_CLIENT_IP'];
else if ($_SERVER['HTTP_X_FORWARDED_FOR'] && strcasecmp($_SERVER['HTTP_X_FORWARDED_FOR'], "unknown"))
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if ($_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
$ip = $_SERVER['REMOTE_ADDR'];
else $ip = "unknown";
return($ip);
}Code: Select all
Notice: Undefined index: HTTP_CLIENT_IP in modules/common.php on line 21
Notice: Undefined index: HTTP_X_FORWARDED_FOR in modules/common.php on line 23Also, does having a warning appear count as info before the header? I'm getting those messages all the time as well when the messages are turned on.
Thanks