#!/usr/bin/perl # Dynamic DNS determining program # # Usage: Ask the router for the WAN address, and post it to # the webpage. # # require LWP::UserAgent; $in_file = "./WANIP_LOG.txt"; $out_file = "./WANIP_LOG.txt"; $dlinkpwd = ''; $ua = LWP::UserAgent->new; $ua->credentials('192.168.0.103','192.168.0.103','admin',$dlinkpwd); $req = HTTP::Request->new('GET','http://192.168.0.1/st_devic.html'); $res = $ua->request($req); print $res->status_line; print "\n";