Monday, February 13, 2017

How to check geo location from ip address


If you have curl installed on your ubuntu, you can use it to check your geo location based on ip-address, it is very easy to do.

How to check geo location from ip address on ubuntu
curl ipinfo.io
Example output:
{
  "ip": "167.114.102.230",
  "hostname": " ns510622.ip-167-114-102.net",
  "city": "Montreal",
  "region": "Quebec",
  "country": "CAN",
  "loc": "45.5040,-73.5747",
  "org": "AS16276 OVH SAS"
}

All of this possible because of curl and ipinfo.io, If you don't have curl, you can install with 'sudo apt-get install curl'.

No comments:

Post a Comment