ifconfig -a|grep "inet addr"|awk '{print $2}'

wget http://myip.dk&&; cat index.html|grep "<div class=\"Box\""&& rm
index.html*

this wget prolly better with urllib as prevoiusly noted by Дамјан, hope this
helps...

-Alex Goretoy
http://www.alexgoretoy.com
somebodywhoca...@gmail.com


On Tue, Jan 20, 2009 at 3:42 AM, Дамјан Георгиевски <gdam...@gmail.com>wrote:

> Something *like*  this could work:
>
>        myip = 
> urllib2.urlopen('http://whatismyip.org/').read(<http://whatismyip.org/%27%29.read%28>
> )
>
> of course then you are depending on an external service, not a very
> reliable one even. But then again, you might create an internal service
> like that yourself.
>
> This cgi-bin shell code like this for ex:
>
> #! /bin/sh
> echo "Content-type: text/plain"
> echo
> echo "${REMOTE_ADDR}"
>
>
> --
> дамјан ( http://softver.org.mk/damjan/ )
>
> Spammers scratch here with a diamond to find my address:
> |||||||||||||||||||||||||||||||||||||||||||||||
> --
> http://mail.python.org/mailman/listinfo/python-list
>
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to