Posted by upendrajpr on 12/20/07 06:08
Hello friends,
I am using the function
of how to get client IP from my website but it always
give me the server ip not any client who send me the info..
function getIP() {
$ip;
if (getenv("HTTP_CLIENT_IP"))
$ip = getenv("HTTP_CLIENT_IP");
else if(getenv("HTTP_X_FORWARDED_FOR"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if(getenv("REMOTE_ADDR"))
$ip = getenv("REMOTE_ADDR");
else
$ip = "UNKNOWN";
return $ip;
}
thanx in advance
Navigation:
[Reply to this message]
|