You are not logged in.
![]() |
Source code |
1 2 3 4 5 6 7 8 9 10 11 |
# Retrieve the external IP address through a web service. # Released into the public domain. import urllib2 SERVICE_URL = '[url]http://www.whatismyip.org/'[/url] try: print 'External IP address: %s' % urllib2.urlopen(SERVICE_URL).read().strip() except urllib2.URLError, e: print 'Error fetching external IP address: %s' % e |
-