Yeodan Posted May 2, 2009 Share Posted May 2, 2009 There seem to be several ways to get a user's IP, wich one should I use? I'm making an MMORPG brower game but I'm not an expert on IP tracking Link to comment https://forums.phpfreaks.com/topic/156591-what-method-do-i-use-to-get-a-users-ip/ Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 There are 3 ways that I know of. Here's one getenv('REMOTE_ADDR'); Link to comment https://forums.phpfreaks.com/topic/156591-what-method-do-i-use-to-get-a-users-ip/#findComment-824501 Share on other sites More sharing options...
taith Posted May 2, 2009 Share Posted May 2, 2009 function ip(){ return (!$ip=@$REMOTE_ADDR) ? $_SERVER['REMOTE_ADDR'] : $ip; } Link to comment https://forums.phpfreaks.com/topic/156591-what-method-do-i-use-to-get-a-users-ip/#findComment-824503 Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 Is there a difference in $REMOTE_ADDR and $_SERVER['REMOTE_ADDR']? Link to comment https://forums.phpfreaks.com/topic/156591-what-method-do-i-use-to-get-a-users-ip/#findComment-824504 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.