RSSAmplifier

imagineer | Praseetha KR · Sep 26, 2011

Python script to find the current External IP

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

Here is a simple python 2.7 snippet for finding the current external IP address. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 import httplib import string conn = httplib . HTTPConnection ( 'checkip.dyndns.org' , 80 ) conn . request ( 'GET' , '/index.html' ) res = conn . getresponse () conn . close () if res . status == 200 : response = res . read () else : print 'Error connecting to the server!!…

Read on imagineer.in

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.