Hello all, I am wondering if anyone would be kind enough to help me with a perl to php conversion.
The perl code
PHP Code:
$buffer=$ENV{'QUERY_STRING'};
# Split the name-value pairs
@pairs = split(/&/, $buffer);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;
if ($allow_html != 1) {
$value =~ tr/</ /;
$value =~ tr/>/ /;
}
$FORM{$name} = $value;
}
Thanks for any help
3P