4 ms·
Not strictly a curl hack, but you can quickly get your IP geolocation details with curl and http://ipinfo.io http://ipinfo.io (full disclosure, it's my service)
by coderholic 11y ago
Not strictly a curl hack, but you can quickly get your IP geolocation details with curl and http://ipinfo.io http://ipinfo.io (full disclosure, it's my service):
$ curl ipinfo.io
{
"ip": "208.54.39.206",
"hostname": "mce2736d0.tmodns.net",
"city": "Los Angeles",
"region": "California",
"country": "US",
"loc": "34.0522,-118.2437",
"org": "AS21928 T-Mobile USA, Inc.",
"postal": "90013",
"phone": 213
}
Or just your IP
$ curl ipinfo.io/ip
208.54.39.206
Or any other field (eg. city)
$ curl ipinfo.io/city
Los Angeles
Or lookup another IP
$ curl ipinfo.io/8.8.8.8
{
"ip": "8.8.8.8",
"hostname": "google-public-dns-a.google.com",
"city": "Mountain View",
"region": "California",
"country": "US",
"loc": "37.3860,-122.0838",
"org": "AS15169 Google Inc.",
"postal": "94040",
"phone": 650
}
Or a specific field for that IP:
$ curl ipinfo.io/8.8.8.8/org
AS15169 Google Inc.
- dfc 11y agoIf you start a comment out with "not strictly [related to linked article]" and hijack the discussion by plugging a website it seems like the decent thing to do is mention that you are the developer behind said website. I think this is even more important when you include so much <pre> text that the other comments are pushed so far down the page. Full-Disclosure: Some people still believe in it
- coderholic 11y agoThanks for the tip. I've updated the comment to add the disclosure. Definitely not my intention to hide it though, it's clearly listed in my profile.
- sigma2015 11y ago> the decent thing to do is mention that you are the developer behind said website or just use a fake account ... like anybody else :D
- krat0sprakhar 11y agoI can't probably count how many times I use this in a week. Thank you very much for this service :)
- keithpeter 11y agoAnd I've just spent a bit of time playing with this service. I think that authors should be proud of their work and claim credit up front on HN.
- mahouse 11y agoRegardless how good your service could be, this is completely unrelated to the article.