Skip to content

Instantly share code, notes, and snippets.

@jcro21
Last active October 30, 2020 02:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcro21/280864e6ea9e953a15367dc614cafc27 to your computer and use it in GitHub Desktop.
Save jcro21/280864e6ea9e953a15367dc614cafc27 to your computer and use it in GitHub Desktop.
geolocate ip address for internal server logs
hoyeroy573@llubed.com
temp1234_
API key 21e669ff5e1d7cb7881a9aaa31a22cb2
http://api.ipstack.com/222.186.42.137?access_key=21e669ff5e1d7cb7881a9aaa31a22cb2&output=json&fields=continent_name,country_name,region_name,city
{
"ip": "222.186.42.137",
"type": "ipv4",
"continent_code": "AS",
"continent_name": "Asia",
"country_code": "CN",
"country_name": "China",
"region_code": "JS",
"region_name": "Jiangsu",
"city": "Nanjing",
"zip": "210000",
"latitude": 32.04582977294922,
"longitude": 118.78417205810547,
"location": {
"geoname_id": 1799962,
"capital": "Beijing",
"languages": [
{
"code": "zh",
"name": "Chinese",
"native": "\u4e2d\u6587"
}
],
"country_flag": "http:\/\/assets.ipstack.com\/flags\/cn.svg",
"country_flag_emoji": "\ud83c\udde8\ud83c\uddf3",
"country_flag_emoji_unicode": "U+1F1E8 U+1F1F3",
"calling_code": "86",
"is_eu": false
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment