PDA

View Full Version : http query via scripting


skyboy
August 1st, 2005, 08:54 AM
Hi,

I wanted to know if it is possible to create a script to be able to retrieve my IP address from http://www.whatismyip.com
My router's IP is dynamic and changing quite often so it would be great so I could add this script to my superkaramba theme to know my IP address as soon as it changes.

OOhh yes, my computer is connect to my router, so basically it's my router IP address I need to retreive, that is why I can't use something like
ifconfig ath0 | grep 'inet addr' | cut -d ':' -f2 | cut -d ' ' -f1

thanks :)

skyboy
August 1st, 2005, 12:24 PM
up :)

flyinglizard
August 1st, 2005, 02:18 PM
w3m www.whatismyip.com -dump_source|grep "<TITLE>"|cut -d " " -f 5

skyboy
August 1st, 2005, 02:44 PM
Wooo, no kidding, you did it !! :D
I'm amazed, i didn't know it was even possible !!
Thank you so much !!

Teren
August 8th, 2005, 12:26 PM
What about:

GET whatsmyip.net | grep "<TITLE>"| cut -d " " -f 7 | sed -e 's/[a-Z]//g;s/[<>\/]//g'

Hehe ;)

skyboy
August 9th, 2005, 02:45 PM
nice too :D !!