A
PPENDICES
S
ECTION
A
PPENDIX
C
8
E
6 T
ECHNOLOGIES
, R3000 E
NTERPRISE
F
ILTER
U
SER
G
UIDE
477
CGI written in Perl
There are two methods for CGI written in Perl: One lets you
embed data in the query string to pass data to the Options
CGI, and the other lets you use Java Script to post form data
to the Options CGI.
Embed data in query string
#!/usr/bin/perl
# Original Filename: cusp_block1.cgi
# File Type:
CGI
# Description: Sample Perl script for R3000 customized block page
# Replace the <R3000 IP> with the real IP before using.
# This script provide data to the options CGI through query string
# 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 "</head>\n";
print "<body>\n";
print "<br>R3000 Customized Block Page (CGI written with
Perl)<br>\n";
print "URL: $url<br>\n";
print "IP: $ip<br>\n";
print "CAT: $cat<br>\n";
print "USER: $user<br>\n";
print "<br>For further options, <a href=\"http://<R3000 IP>:81/cgi/
Summary of Contents for Enterprise Filter Authentication R3000
Page 1: ... R3000 Enterprise Filter USER GUIDE Model R3000 Release 2 1 00 Manual Version 1 02 ...
Page 2: ...ii 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...
Page 4: ...iv 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...
Page 578: ...APPENDICES SECTION APPENDIX H 554 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...
Page 594: ...INDEX 570 8E6 TECHNOLOGIES R3000 ENTERPRISE FILTER USER GUIDE ...