Jump to content

location of connections


jahlxx

Recommended Posts

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.

 

Link to comment
Share on other sites

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
}
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...