#!/usr/local/bin/perl # 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: text/html\n\n"; 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 "