That's clever and useful. Thanks. I've used http://checkip.dyndns.org for this problem for years, but this is an improvement. Checkip: >>> url = urllib2.urlopen("http://checkip.dyndns.org") >>> url.read() ' Current IP Check Current IP Address: 192.168.0.1 \r\n' Details here: http://www.dyndns.com/developers/checkip.html It's not as easy to parse as JSON, but nor is it very difficult. The format has not changed in yea…
Your IP. In JSON
51–60 of 72 posts
Re: Your IP. In JSON
#52Re: Your IP. In JSON
#53add a jsonp callback option like http://jsonip.com/?callback=alert
Re: Your IP. In JSON
#54Whoa. I wrote jsonip a few months ago and never expected it to get noticed. What a pleasant surprise! Here's the original post with some usage details. http://news.ycombinator.net/item?id=1896015 This is actually running on node.js. If anyone finds a bug or has some suggestions, email me or leave a tweet @geuis.
Re: Your IP. In JSON
#55i am missing something here. why does everyone here seem to think this is cool?
Re: Your IP. In JSON
#56i am missing something here. why does everyone here seem to think this is cool?
Could anyone list some practical uses ?
Re: Your IP. In JSON
#57Some suggestions: Make jsonip.com dual stack IPv4/IPv6 and work for IPv6 addresses too. Return some other useful IP information, such as the PTR, the domain name part of the PTR, and the country code and name. Example: https://grepular.com/ipinfo EDIT: Don't use that URL for your own stuff or I'll block it. I only put it there as an example of how the JSON should be returned. EDIT2: Might be useful if it included the…
IPv6 is silly to support. There are no IPv6 NATs, so you should know your IPv6 address.
Re: Your IP. In JSON
#58A simple way of accessing your public IP from bash (for some reason I need to do that a lot!)
Re: Your IP. In JSON
#59Also, icanhazip.com
Re: Your IP. In JSON
#60if you need geolocation information through javascript, you can use maxmind's free one: http://j.maxmind.com/app/geoip.js
Great find!