Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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()
    '<html><head><title>Current IP Check</title></head><body>Current IP Address: 192.168.0.1</body></html>\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 years; I've got a regex running I haven't needed to adjust since day 1.





What a convenient URL to remember.


For a while, http://whatismyip.org/ returned your IP in plain text, but no longer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: