$ curl ipinfo.io/2001:888:0:18::80
{
"ip": "2001:888:0:18::80",
"hostname": "www.xs4all.nl",
"city": null,
"country": "NL",
"loc": "52.5000,5.7500",
"org": "AS3265 Xs4all Internet BV"
}
If you only want the country:
$ curl ipinfo.io/2001:888:0:18::80/country
NL
$ python -c "import urllib2; print urllib2.urlopen(urllib2.Request('http://ipinfo.io/country', headers={'User-Agent' : 'curl'})).read() "
NL
Let's try HTTPS:
$ curl https://ipinfo.io/2001:888:0:18::80
SSL access is restricted to paid plans. See http://ipinfo.io/pricing for more details
... ah ... pity.
No comments:
Post a Comment