PHP Code:
#!/usr/bin/perl
require './cookie-lib.pl';
my %PARAMS;
my $redirectto='';
getPost(\%PARAMS);
print "Content-type: text/html\n";
my $return_url = $PARAMS{'redirectto'};
print "\n";
print <<__REDIRECT__;
<html>
<head>
<META http-equiv="REFRESH" content="0; url=$redirectto">
</head>
<body>
<h3>Please wait.. Redirecting..</h3>
</body>
</html>
__REDIRECT__
sub ParseValue # {the value}
{
my $value = shift;
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/~!/ ~!/g;
$value;
}
sub getPost # ($PARAMSRef)
{
# Get the input
my $buffer = "";
my $PARAMSRef = shift;
read(STDIN,$buffer,$ENV{'CONTENT_LENGTH'});
@pairs=split(/&/,$buffer);
#put everything into name/value pairs and store in LOGIN
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$name = ParseValue($name);
if ($PARAMSRef->{$name} ne '') {
$PARAMSRef->{$name} = $PARAMSRef->{$name} . '|' . ParseValue($value);
}
else {
$PARAMSRef->{$name} = ParseValue($value);
}
}
}
example above, this will actually perform a redirect on the client side when the page has been returned, you can also do it thus..
print "Location: www.myredirect.co.uk";
Is this what you are meaning, you will obviously have to store/forward the contents of the form ...
Social Networking Bookmarks