View Single Post
Old 08-14-2006   #3 (permalink)
Cr0w
Registered User
 
Cr0w's Avatar
 
Join Date: Mar 2006
Location: Comodoro Rivadavia, Chubut, ARgentina.
Posts: 22

Send a message via MSN to Cr0w Send a message via Yahoo to Cr0w
hello, u can try to save in the var $ip this:
ifconfig eth0 | grep inet | awk '{print $2}'
u will get addr:0.0.0.0
then..with perl..remove the substring addr: and u get the ip
another way is..if u have internet acces..(i dont know
if that server will be local or public) u can do
/usr/bin/curl -s http://ip.dnsexit.com/ | sed -e 's/ //'
or
/usr/bin/wget -o /dev/null -O - http://ip.dnsexit.com/
i hope this work for u
good bye.

pd: sorry my english.
Cr0w is offline