jaslife Posted December 13, 2007 Share Posted December 13, 2007 is there a function in php that enables me to determine the ip address of a user that logs in to the server? if so, what is it? if there is no function, is there a way i can achieve this? please help.. Link to comment https://forums.phpfreaks.com/topic/81454-how-can-i-know-the-ip-address-of-a-client-pc-using-php/ Share on other sites More sharing options...
peranha Posted December 13, 2007 Share Posted December 13, 2007 $IPnumber = getenv("REMOTE_ADDR"); Link to comment https://forums.phpfreaks.com/topic/81454-how-can-i-know-the-ip-address-of-a-client-pc-using-php/#findComment-413511 Share on other sites More sharing options...
pocobueno1388 Posted December 13, 2007 Share Posted December 13, 2007 Or you can do this $ip = $_SERVER['REMOTE_ADDR']; Link to comment https://forums.phpfreaks.com/topic/81454-how-can-i-know-the-ip-address-of-a-client-pc-using-php/#findComment-413512 Share on other sites More sharing options...
jaslife Posted December 13, 2007 Author Share Posted December 13, 2007 thanks a lot. Link to comment https://forums.phpfreaks.com/topic/81454-how-can-i-know-the-ip-address-of-a-client-pc-using-php/#findComment-413515 Share on other sites More sharing options...
cooldude832 Posted December 13, 2007 Share Posted December 13, 2007 just a note there is a list of the $_SERVER vars here http://us.php.net/manual/en/reserved.variables.php take some of them with a grain of salt as their reliability is to be questioned as the user has free access to alter them. Link to comment https://forums.phpfreaks.com/topic/81454-how-can-i-know-the-ip-address-of-a-client-pc-using-php/#findComment-413531 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.