i write a script to display visitor IP address.
I use this : $HTTP_SERVER_VARS["REMOTE_ADDR"]
but my visitor say he has two IP different when show two website.
With showmyip.com he has :
222.252.36.104

With my script he has :
203.162.1.49

and he say that the IP with showmyip.com is real his IP address, because he use internet through router.
Anyone can help me to find the IP of his router.
With $HTTP_SERVER_VARS["REMOTE_ADDR"].
Thank !!!

i have solve this problem !!!
Here is my tips :

use this function :

function RealIpAddress() 
{ 
        $ip = 'unknown'; 
        if(getenv("HTTP_CLIENT_IP")) { 
                $ip = getenv("HTTP_CLIENT_IP"); 
        } elseif(getenv("HTTP_X_FORWARDED_FOR")) { 
                $ip = getenv("HTTP_X_FORWARDED_FOR"); 
        } else { 
                $ip = getenv("REMOTE_ADDR"); 
        } 
return $ip; 
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.