#!/usr/bin/perl # AS ROOT run This script # use LWP ; # remember to install the lwp from cpan.org use strict; # The ifconfig is usefull if You want to find the local adress # and You have to run as root to use it # To use it in crontab You have adress it with full path sbin on most Unix systems my @lines = `/sbin/ifconfig eth0`; # Change this to Your network card # attached to internet my $address; for( @lines ) { if ( /\s*inet addr:([\d.]+)/ ) { $address = $1; # print $1; # -- usefull traceprint } } # Remove the ip part if You want the adress of the router insted of # the local network to bee visible # my $url="http://www.congoed.us/work/wimc.php?action=update&name=NAMEXXX&pass=PASSXXX"."&ip=".$address; my $browser = LWP::UserAgent->new ; my $response = $browser->get($url) ; # The lines below is just to verify the result with a webserver # and not needed for the script to work print <is_success; print $response->content;