#!/usr/local/bin/perl
#############################################################################
##
## Ping/traceroute CGI
##
## Copyright (C) 1997 Chris Johnson (sixie@nccnet.co.uk)
##
#############################################################################
##
## This is an all in one thing...no seperate HTML page needed!! Just place
## this in your cgi-bin directory and your away :-)
##
#############################################################################
require '/usr/local/httpd/cgi-bin/cgi-lib.pl';
print &PrintHeader;
print '';
print '
';
print 'Ping/Traceroute Gateway';
print '';
print '';
if (&MethGet) {
print '';
print 'Ping/Traceroute Gateway
';
print 'This is a gateway for ping and traceroute - it will allow you ';
print 'to see if a host on the internet is up, and optionally will ';
print 'return the route.';
print '';
} else {
&ReadParse(*input);
$site = $input{SITE};
$query = $input{QUERY};
if ( $site eq "" ) {
print 'Sorry,
';
print '...but you need to enter a name of a site to try and';
print 'contact. Please ';
print "try again...";
print '';
exit 0;
}
if ( $query eq "" ) {
print 'Sorry,
';
print '...but you need to enter a query type.';
print 'Please ';
print "try again...";
print '