The Little Guy Posted May 6, 2010 Share Posted May 6, 2010 Do mobile phones have an ip address? Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/ Share on other sites More sharing options...
Daniel0 Posted May 6, 2010 Share Posted May 6, 2010 If they're connected to the internet, yes. Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/#findComment-1054250 Share on other sites More sharing options...
The Little Guy Posted May 6, 2010 Author Share Posted May 6, 2010 OK! Â That means this will work... Right? Â <?= $_SERVER['REMOTE_ADDR']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/#findComment-1054253 Share on other sites More sharing options...
Daniel0 Posted May 6, 2010 Share Posted May 6, 2010 There will always be a remote address. Where else should the response go? Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/#findComment-1054258 Share on other sites More sharing options...
xcoderx Posted May 6, 2010 Share Posted May 6, 2010 function ipCheck() { if (getenv('HTTP_CLIENT_IP')) { $ip = getenv('HTTP_CLIENT_IP'); } elseif (getenv('HTTP_X_FORWARDED_FOR')) { $ip = getenv('HTTP_X_FORWARDED_FOR'); } elseif (getenv('HTTP_X_FORWARDED')) { $ip = getenv('HTTP_X_FORWARDED'); } elseif (getenv('HTTP_FORWARDED_FOR')) { $ip = getenv('HTTP_FORWARDED_FOR'); } elseif (getenv('HTTP_FORWARDED')) { $ip = getenv('HTTP_FORWARDED'); } else { $ip = $_SERVER['REMOTE_ADDR']; } return $ip; } Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/#findComment-1054298 Share on other sites More sharing options...
xcoderx Posted May 6, 2010 Share Posted May 6, 2010 soo many ways to detect ip :-) anything works for a mobile device just like it does with web browsers. but if by any means u want to get their IMEI thats not possible. detecting phone numbers is slightly possible. Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/#findComment-1054305 Share on other sites More sharing options...
Daniel0 Posted May 6, 2010 Share Posted May 6, 2010 Oh, nice. You've just made it way easier for me spoofing my address on your website Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/#findComment-1054310 Share on other sites More sharing options...
xcoderx Posted May 6, 2010 Share Posted May 6, 2010 ok :-) Quote Link to comment https://forums.phpfreaks.com/topic/200927-cell-phone-ip-address/#findComment-1054318 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.