RON_ron Posted July 1, 2010 Share Posted July 1, 2010 <?php function getRealIpAddr() { if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet { $ip=$_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy { $ip=$_SERVER['HTTP_X_FORWARDED_FOR']; } else { $ip=$_SERVER['REMOTE_ADDR']; } echo "ip=" . $ip; } ?> Link to comment https://forums.phpfreaks.com/topic/206375-any-idea-why-isnt-this-functioning/ Share on other sites More sharing options...
trq Posted July 1, 2010 Share Posted July 1, 2010 You are kidding right? Link to comment https://forums.phpfreaks.com/topic/206375-any-idea-why-isnt-this-functioning/#findComment-1079616 Share on other sites More sharing options...
RON_ron Posted July 1, 2010 Author Share Posted July 1, 2010 I'm serious. Link to comment https://forums.phpfreaks.com/topic/206375-any-idea-why-isnt-this-functioning/#findComment-1079619 Share on other sites More sharing options...
trq Posted July 1, 2010 Share Posted July 1, 2010 This might help you. Link to comment https://forums.phpfreaks.com/topic/206375-any-idea-why-isnt-this-functioning/#findComment-1079628 Share on other sites More sharing options...
RON_ron Posted July 2, 2010 Author Share Posted July 2, 2010 Thanks mate. Link to comment https://forums.phpfreaks.com/topic/206375-any-idea-why-isnt-this-functioning/#findComment-1080070 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.