jahlxx Posted December 18, 2017 Share Posted December 18, 2017 Hi. For securyty, monitor a statistical questions, I log every connection to my apps, and store the source IP in a log file using UniSession.RemoteIP. Is there any way to get the location of the IP (country, state, etc.)? This could be useful for us. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
delagoutte Posted December 18, 2017 Share Posted December 18, 2017 i don't use it in delphi (i used it in apache web server) but you could search implementation of GeoIp in delphi. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted December 18, 2017 Author Share Posted December 18, 2017 Thanks. Looking for info about GeoIP, as you commented, I've found this: http://www.ipinfodb.com/ip_location_api.php Tested, and wotking fine. Thanks, Quote Link to comment Share on other sites More sharing options...
Harry Rogers Posted December 18, 2017 Share Posted December 18, 2017 There are a number of Geolocation APIs - Some free e.g. a 'Get' to http://freegeoip.net/json/ipAddressHere returns this json [N.B. It's not that geographically accurate but for me it's the correct country and within 10-15 miles!] { "ip": "xxx.xxx.xxx.xxx", "country_code": "GB", "country_name": "United Kingdom", "region_code": "ENG", "region_name": "England", "city": "Bromley", "zip_code": "BR1", "time_zone": "Europe/London", "latitude": 51.4, "longitude": 0.05, "metro_code": 0 } Quote Link to comment Share on other sites More sharing options...
jahlxx Posted December 18, 2017 Author Share Posted December 18, 2017 ok. thanks. Enviado desde mi SM-A500FU mediante Tapatalk Quote Link to comment 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.