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.
This brings up something I'm waffling on. Whats the correct content type for JSON?
in your example returning "Content-Type: text/plain; charset=UTF-8" which is nice because FF knows to render it in the browser (good for debugging atleast).
But votes on SO seem to indicate it should be
"application/json"
The correct content-type (MIME type) is indeed "application/json" (edit: downcased JSON, not sure why I made that typo). http://tools.ietf.org/html/rfc4627
Additionally, if no encoding is specified, UTF-8 should be assumed when dealing with JSON.
Some of this is already available elsewhere: I've been using http://ipinfodb.com/ to decide whether to show a region-specific alert on the front page of http://mappin.es
There are two scenarios where such a site has been useful to me:
1) Making sure I deprecated the right addresses in the Linux kernel, and that the kernel was using the outgoing address I wanted instead of the one it would pick via RFC 3484, and
2) Making sure IPv6 browsing is working since turning off v4 is a pain in the ass (in the setups I've had to troubleshoot v6 on, not my home network, where it's much easier).
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 IP addresses from any X-Forwarded-For HTTP header too.