/ Published in: PHP
URL: http://roshanbh.com.np/2007/12/getting-real-ip-address-in-php.html
Expand |
Embed | Plain Text
<?php function getRealIpAddr() { { $ip=$_SERVER['HTTP_CLIENT_IP']; } { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } return $ip; } ?>
You need to login to post a comment.
