Menu Redirector
#!/usr/bin/perl
####################################################################
# #
# Menu Redirector #
# Kastle Internet Services #
# http://www.kastle.net #
# kastle@kastle.net #
# #
####################################################################
# #
# THIS PROGRAM MAY BE USED AND DISTRIBUTED FREELY PROVIDED #
# NO MODIFICATIONS ARE MADE TO THE CODE. #
# #
# Copyright (c) 1998 - Kastle Internet Services #
# All rights reserved #
# Written & Tested by Kastle Internet Services #
# gatekeeper@kastle.net #
# #
# #
####################################################################
# DISCLAIMER: #
# #
# In no event will Kastle Internet Services be liable to the user #
# of this script or any third party for any damages, including #
# any lost profits, lost savings or other incidental, #
# consequential or special damages arising out of the operation #
# of or inability to operate this script, even if user has been #
# advised of the possibility of such damages. #
# #
####################################################################
#########################################
# DO NOT EDIT BELOW THIS LINE #
#########################################
&parse_form;
$gotourl = $FORM{'url'};
print "Location: $gotourl\n\n";
sub parse_form {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$FORM{$name} = $value;
}
}
Комментарии:
Нету комментариев для вывода...