ifconfig -a|grep "inet addr"|awk '{print $2}'<br><br>wget <a href="http://myip.dk">http://myip.dk</a>&& cat index.html|grep "<div class=\"Box\""&& rm index.html*<br>
<br>this wget prolly better with urllib as prevoiusly noted by Дамјан, hope this helps...<br><br clear="all">-Alex Goretoy<br><a href="http://www.alexgoretoy.com">http://www.alexgoretoy.com</a><br><a href="mailto:somebodywhocarez@gmail.com">somebodywhocarez@gmail.com</a><br>
<br><br><div class="gmail_quote">On Tue, Jan 20, 2009 at 3:42 AM, Дамјан Георгиевски <span dir="ltr"><<a href="mailto:gdamjan@gmail.com">gdamjan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Something *like* this could work:<br>
<br>
myip = urllib2.urlopen('<a href="http://whatismyip.org/%27%29.read%28" target="_blank">http://whatismyip.org/').read(</a>)<br>
<br>
of course then you are depending on an external service, not a very<br>
reliable one even. But then again, you might create an internal service<br>
like that yourself.<br>
<br>
This cgi-bin shell code like this for ex:<br>
<br>
#! /bin/sh<br>
echo "Content-type: text/plain"<br>
echo<br>
echo "${REMOTE_ADDR}"<br>
<font color="#888888"><br>
<br>
--<br>
дамјан ( <a href="http://softver.org.mk/damjan/" target="_blank">http://softver.org.mk/damjan/</a> )<br>
<br>
Spammers scratch here with a diamond to find my address:<br>
</font><div><div></div><div class="Wj3C7c">|||||||||||||||||||||||||||||||||||||||||||||||<br>
--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br>