/ Published in: PHP
Better Client/Remote IP function
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function Client_IP() { #array('HTTP_CLIENT_IP', 'CLIENT_IP', 'REMOTE_ADDR', 'HTTP_PROXY_CONNECTION', 'HTTP_FORWARDED', 'HTTP_X_FORWARDED', 'FORWARDED_FOR_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED_FOR_IP', 'HTTP_X_FORWARDED_FOR', 'FORWARDED', 'X_FORWARDED_FOR', 'FORWARDED_FOR', 'X_FORWARDED', 'HTTP_VIA', 'VIA'); else: $_Str_Return= HTTP_SERVER_VARS['REMOTE_ADDR']; endif; return($_Str_Return); }
URL: http://www.ypy.ir