#!/usr/local/bin/perl # Adjust the above line to find perl on your system # test-env.cgi Copyright 1995 by David Efflandt efflandt@xnet.com # May be freely distributed and modified. # Author is not responsible for its use. # Note: Variable list will differ if run locally from UNIX # Print content-type for HTTP/1.0 compatibility print "Content-type: text/html\n\n"; # Print title and initial heading print "
\n";} # Resolve REMOTE_HOST into name $ip_address = $ENV{'REMOTE_ADDR'}; @numbers = split(/\./, $ip_address); $ip_number = pack("C4", @numbers); ($name) = (gethostbyaddr($ip_number, 2))[0]; if (defined $name) {print "
\n"; print 'Return to my home page.
'; exit;