c_323_h Posted March 17, 2007 Share Posted March 17, 2007 Hello all, How would I detect someone's IP address and find out what city they are in? I couldn't really find any tutorials clearly explaining how to do this so any kind of help would be appreciate. Thanks Link to comment https://forums.phpfreaks.com/topic/43077-how-do-i-detect-ip-address/ Share on other sites More sharing options...
cshireman Posted March 17, 2007 Share Posted March 17, 2007 try this: $ipAddress = $_SERVER['REMOTE_ADDR']; Link to comment https://forums.phpfreaks.com/topic/43077-how-do-i-detect-ip-address/#findComment-209267 Share on other sites More sharing options...
c_323_h Posted March 17, 2007 Author Share Posted March 17, 2007 Thanks, But I would I find out which city the IP address is coming from? Link to comment https://forums.phpfreaks.com/topic/43077-how-do-i-detect-ip-address/#findComment-209291 Share on other sites More sharing options...
iloveny Posted March 17, 2007 Share Posted March 17, 2007 I think you can use webservice for this. There is a webservice where if you invoke them with an IP address, they will tell me on which country / city the machine is located. Try this webservice website: http://www.xmethods.net/ There are some more out there, try to google it. The thing is you have to integrate webservice in to your PHP. Link to comment https://forums.phpfreaks.com/topic/43077-how-do-i-detect-ip-address/#findComment-209313 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.