#!/usr/bin/perl ############################################################################## # By BumbleBeeWare.com 2006 # returns website status to monitoring program # mystatus2.cgi ############################################################################## # authorized address the ip of the server getting accessing the script $authaddress = "192.168.0.10"; # end configuration print "Content-type: text/html\n\n"; if ($ENV{'REMOTE_ADDR'} eq "$authaddress") { print "I AM WORKING!\n"; $uptime = open( UPTIME, "/usr/bin/uptime |" ); while (){print;} close( UPTIME ); } else {print "unauthorized access";} exit;