#!/usr/bin/perl -w # # Version 2.0 - updated July 9, 2000. # This script requires the use of Perl 5 and the LWP:Useragent module. # upload this script and then rename it "locations.pl". # You will need to change the permission of this script to "755". read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { local($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ s///g; $FORM{$name} = $value; } # if you want all networks listed equal it to 0. # UU.net only = 1, alternate only = 2, filtered + static only = 3; $network = '0'; use LWP::UserAgent; use HTTP::Request; use HTTP::Status; $| = 1; my $ua = new LWP::UserAgent; $host = "scripts.safepages.com"; $script = "/usa/callfind/locations.pl"; $postdata = 'network=' . "$network" . '&'; $fullurl = "http://" . $host . $script . "?" . $postdata; my $request = new HTTP::Request 'GET', $fullurl; my $response = $ua->request ($request); $resp = $response->content(); print ("Content-type: text/html\n\n"); &printHeader; print "
${resp}
";
&printFooter;
exit;
########################################################################
#
# PRINT HEADER
#
sub printHeader {
open( HEADER, "./head.tmpl" ) || print "Open [ HEADER ] failed: $!\n";
while(