Last active
January 2, 2016 14:39
-
-
Save alexandrevicenzi/8318318 to your computer and use it in GitHub Desktop.
Find your external IP using Pyhton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: UTF-8 -*- | |
import urllib | |
# Telize is a JSON IP and GeoIP REST API | |
url = 'http://www.telize.com/ip' | |
u = urllib.urlopen(url) | |
data = u.read() | |
print data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment