Scripter47 wrote:

>> python -c 'import re, urllib; print re.findall("<title>Your IP: 
>> (.+?)</title>", urllib.urlopen("http://myip.dk/";).read())[0]'
> 
> Hmm then you need Internet connecting.

That's what IP adresses are for...

> can i do it without that?

Perhaps you could use the method mentioned in
  http://mail.python.org/pipermail/python-list/1999-August/009153.html

> and it doesn't work either :(

Works for me:

#v+

[EMAIL PROTECTED]:~ $ python -c 'import re, urllib; print 
re.findall("<title>Your IP: (.+?)</title>", 
urllib.urlopen("http://myip.dk/";).read())[0]'
217.157.1.202
[EMAIL PROTECTED]:~ $

#v-

Cheers,

-- 
Klaus Alexander Seistrup
http://klaus.seistrup.dk/

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to