8e6 Technologies ProxyBlocker ユーザーズマニュアル

ページ / 482
 A
PPENDICES
 S
ECTION
  A
PPENDIX
 C
8
E
6 T
ECHNOLOGIES
, P
ROXY
B
LOCKER
 U
SER
 G
UIDE
415
print "<br>For further options, <a href=\"http://<ProxyBlocker 
IP>:81/cgi/
block.cgi?URL=$url&IP=$ip&CAT=$cat&USER=$user&STEP=STEP2\">click
here</a><br>\n";
print "</body>\n";
print "</html>\n";
Use Java Script to post form data
#!/usr/bin/perl
# Original Filename: cusp_block2.cgi
# File Type: 
CGI
# Description: 
Sample Perl script for ProxyBlocker customized 
block page
# Replace the <ProxyBlocker IP> with the real IP before using.
# This script uses Java Script to post form data to
# options CGI
# Revision: 
1
# Date: 03/08/2004
$method = $ENV{'REQUEST_METHOD'};
if ($method=~ /post/i) {
$string = <STDIN>;
} else {
$string= $ENV{"QUERY_STRING"};
}
$url = $1 if ($string =~ /URL=(\S+)&IP=/i);
$ip = $1 if ($string =~ /IP=(\S+)&CAT=/i);
$cat = $1 if ($string =~ /CAT=(\S+)&USER=/i);
$user = $1 if ($string =~ /USER=(\S+)/i);
print "Content-type: text/html\n\n";
print "<html>\n";
print "<head>\n";
print "<script language=\"JavaScript\">\n";
print "function do_options()\n";
print "{\n";
print "document.block.action=\"http://<ProxyBlocker IP>:81/cgi/
block.cgi\"\n";
print "document.block.submit()\n";
print "}\n";
print "</script>\n";
print "</head>\n";