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