#!/usr/bin/perl # parsedata.cgi print "Content-type: text/html\n\n"; print "Service unavailable: Please Check back later"; sub ParseQuery{ # print "ParseQuery!
\n"; # Find out what the user wants... ($map, $user, $Order) = split("&",$ENV{'QUERY_STRING'}); # Save Query String for later use if need be.. $buffer = $ENV{"QUERY_STRING"}; # Split the name-value pairs @pairs = split(/&/, $buffer); # loop through array and do this.. foreach $pair (@pairs) { # assign variables to the name and respective values ($nume, $value) = split(/=/, $pair); # Un-Webify plus signs and %-encoding # Translate Plus Signs into a space Character $value =~ tr/+/ /; # Find Hexadecimal #'s (%[][]) then convert it to what it should be $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; # Allows you to hit enter in the text field # $value =~ s/\n//g; # youre not gettin' in here secret agent man... (Prevent Hackers #or DIE) $value =~ s///g; # put the info in an associative array $query{$nume} = $value; # end foreach } }