FunctionGetIP () {if (getenv (& quot; HTTP_CLIENT_IP & quot;) & strcasecmp (getenv (& quot; HTTP_CLIENT_IP & quot;), & quot; unknown & quot ;)) $ ipgetenv (& quot; HTTP_CLIENT_IP & quot ;);
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 [R EMOTE_ADDR]) & $ _ SERVER [REMOTE_ADDR] & strcasecmp ($ _ SERVER [REMOTE_ADDR], "unknown") $ ip = $ _ SERVER [REMOTE_ADDR]; else $ ip = "unknown"; return ($ ip) ;}even if the user accesses the Internet through the proxy server, his IP address can be found. However, the proxy server must be of the transparent type. If the proxy server is of the anonymous or high anonymous type, HTTP_X_FORWARDED_FOR is powerless.