##############Read URL Variables##################### @vars = split(/&/, $ENV{QUERY_STRING}); foreach $var (@vars) { ($v,$i) = split(/=/, $var); $v =~ tr/+/ /; $v =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $i =~ tr/+/ /; $i =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $i =~ s///g; $INFO{$v} = $i; } ##############Read URL Variables##################### # # # # # # ##############Read Form Variables#################### read(STDIN, $input, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $input); foreach $pair (@pairs) { ($name, $value) = split(/=/, $pair); $name =~ tr/+/ /; $name =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } ##############Read Form Variables##################### # # # # # # ##############Verify Email Address#################### if ($FORM{'email'} =~ /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/ || $FORM{'email'} !~ /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/) { $myerror = 1; } ##############Verify Email Address##################### # # # # # # ##############Using SendMail########################### open(MAIL, "|$sendmail -t"); print MAIL "To: emailaddress(name)\n"; print MAIL "From: emailaddress(name)\n"; print MAIL "Reply-To: emailaddress\n"; print MAIL "Subject: subject\n"; print MAIL "Content-Type: text/html\n\n"; ###Use Only For HTML $body="\n"; ###Use Only For HTML $body.=$message; print MAIL $body; close MAIL; ##############Using SendMail##################### # # # # # # ##############Set Cookie######################### print "Set-Cookie: userlogin=$userlogin; expires=Mon, 31-Jan-3000 12:00:00 GMT\n"; print "Set-Cookie: userpass=$temppass; expires=Mon, 31-Jan-3000 12:00:00 GMT'\n\n"; ##############Set Cookie##################### # # # # # # ##############Get Cookie##################### foreach (split(/; /,$ENV{'HTTP_COOKIE'})) { ($cookie,$value) = split(/=/); if($cookie eq "userlogin") { $cookielogin="$value"; } if($cookie eq "userpass") { $cookiepass="$value"; } if($cookie eq "cookietest") { $cookietest="$value"; } if($cookie eq "memberlogin") { $memberlogin="$value"; } if($cookie eq "memberid") { $memberid="$value"; } if($cookie eq "memberpass") { $memberpass="$value"; } } ##############Get Cookie#####################