On Thu, Feb 2, 2012 at 3:31 PM, Jim Garrison <j...@jhmg.net> wrote: > On 2/2/2012 3:21 PM, Rich Shepard wrote: >> I want to write a shell script to run as a cron job that checks the >> Frontier-assigned IP address of my DSL line against the current IP address >> and, if changed, uploads the changed address to namecheap.com's DNS servers. >> >> I can see the address (at least while it's static) on my Netgear VFS318, >> but there's not a specific URL for that field on the admin web page. There >> are a bunch of web-based lookup sites; while they immediately display my IP >> address I don't see a way to extract that information from the web page >> (perhaps in the page source code?) for local storage and upload to >> namecheap.com. >> >> Many of you folks are professional network administrators and may already >> have such a script. Or, you can advise me how to proceed. > > whatismyip.com has an automation page that returns ONLY the IP > address. You can easily use curl with the correct link. For > bash: > > MYIP=$(curl http://automation.whatismyip.com/n09230945.asp) >
Rich, You can use this in my script in place of the line that queries the router, just call it NEWIP instead of MYIP NEWIP=$(curl -s http://automation.whatismyip.com/n09230945.asp) Bill _______________________________________________ PLUG mailing list PLUG@lists.pdxlinux.org http://lists.pdxlinux.org/mailman/listinfo/plug