What is the real IP address...?
Posted: Thu Nov 10, 2005 12:42 pm
Hello...
I am trying to get the real IP address of visitors to our websites... We currently provide millions of hits to our customers each month from several downline providers...
The problem is - we are getting between 5% and 10% uniqueness of visitors using _SERVER['REMOTE_ADDR']... Our providers are telling us that the uniqueness is more towards 75%... and, the reasoning is the way they are sending the traffic... They have not been more precise than that at this time...
I have been reading about traffic and proxy servers and so forth and have been wondering if some of our providers are using their 'gateway' as a proxy to deliver the traffic and we are getting the 'gateway' IP instead of the end_user ip...
I found the below script and was wondering if anyone had any thoughts...
Thanks for any help you can give me...
...
I am trying to get the real IP address of visitors to our websites... We currently provide millions of hits to our customers each month from several downline providers...
The problem is - we are getting between 5% and 10% uniqueness of visitors using _SERVER['REMOTE_ADDR']... Our providers are telling us that the uniqueness is more towards 75%... and, the reasoning is the way they are sending the traffic... They have not been more precise than that at this time...
I have been reading about traffic and proxy servers and so forth and have been wondering if some of our providers are using their 'gateway' as a proxy to deliver the traffic and we are getting the 'gateway' IP instead of the end_user ip...
I found the below script and was wondering if anyone had any thoughts...
Code: Select all
function getip() {
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))
$ip = getenv("HTTP_CLIENT_IP");
else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
$ip = getenv("HTTP_X_FORWARDED_FOR");
else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown"))
$ip = getenv("REMOTE_ADDR");
else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
$ip = $_SERVER['REMOTE_ADDR'];
else
$ip = "unknown";
return($ip);
}Thanks for any help you can give me...
...