//Get IP addressfunction GetIP () {if(getenv(' Http_client_ip ') && strcasecmp (getenv(' Http_client_ip '),' Unknown ')) {$thisip=getenv(' Http_client_ip '); } elseif (getenv(' Http_x_forwarded_for ') && strcasecmp (getenv(' Http_x_forwarded_for '),' Unknown ')) {$thisip=getenv(' Http_x_forwarded_for '); } elseif (getenv(' REMOTE_ADDR ') && strcasecmp (getenv(' REMOTE_ADDR '),' Unknown ')) {$thisip=getenv(' REMOTE_ADDR '); } ElseIf (Isset ($_server[' REMOTE_ADDR ']) &&$_server[' REMOTE_ADDR '] && strcasecmp ($_server[' REMOTE_ADDR '],' Unknown ')) {$thisip=$_server[' REMOTE_ADDR ']; } preg_match ("/[\d\." {7,15}/",$thisip,$thisips);$thisip=$thisips[0] ?$thisips[0] :' Unknown ';return$thisip;}
It's been tested. Can get to the real IP address! Tcp/ipv4
You can just put it in the code. You're welcome. Please call me ' Lei Feng '
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the inability to obtain the IP address of PHP to obtain an accurate IP address, including the inability to obtain the IP address of the content, I hope that the PHP tutorial interested in a friend helpful.