$ip1=getenv(REMOTE_ADDR); echo ("Your IP adress is: " . $ip1."
"); if (getenv(HTTP_X_FORWARDED_FOR)){ $ip=getenv(HTTP_X_FORWARDED_FOR); } else { $ip=getenv(REMOTE_ADDR); } echo ("If you are behind a router, your local IP adress is: " . $ip); ?>