#!/usr/local/bin/perl print "Content-type: text/html\n\n"; print "

The local time on this server is: ", scalar localtime," (mountain time).\n"; my $ip_num = pack("C4", split(/\./, $ENV{REMOTE_ADDR})); my $remhost = scalar gethostbyaddr($ip_num, 2); print "

You are connected from $ENV{REMOTE_ADDR}"; if ($remhost && $remhost ne $ENV{REMOTE_ADDR}) { print " which resolves to hostname $remhost.\n"; } else { print " which does not resolve to a hostname.\n"; } print " If you don't think this is you, then you may be ", " going through a firewall, proxy or network cache.\n"; open(OUT,"> testout.txt") || die; print OUT "Reload to refresh this if you recently viewed it\n"; print OUT $ENV{REMOTE_ADDR}." accessed something at ".localtime()."\n"; close OUT; print qq(See testout.txt.\n);