- or download this
#!/bin/perl
...
$in{$name} = $value;
}
- or download this
require "my-cgi-includes.pl";
my %input = %{getforminput()};
- or download this
sub getforminput {
my %in;
...
}
return \%in;
}
- or download this
print "Content-type: text/html\n\n";
...
#mail sent to user
open (MAIL, "|/usr/sbin/sendmail -t");
print MAIL<<toEnd;
- or download this
my %input=%{getforminput()};
my $validto = "jonadab\@bright.net,jonadab_homeip_net\@yahoo.co.uk"
+;
...
<ul>$errors</ul>\n</body>\n</html>\n";
exit 0; # Update: If there were errors, we don't want to send the
+message.
}
- or download this
sub sendmail {
...
print LMAIL ("-- \nSent from $ENV{REMOTE_ADDR} using $0 on $ENV{HOST
+NAME}\n");
close LMAIL;
}
- or download this
# mail sent to admin
sendmail($input{myEmail}, $input{Email}, $input{Subject}, $input{Messa
+ge});
# mail sent to user
sendmail($input{Email}, $input{myEmail}, "Re: ".$input{Subject}, "Than
+ks for your email! \n\n");
- or download this
#submit screen
...
print ("Thanks for your email.");
print ("</body></html");
- or download this
sub H{$_=shift;while($_){$c=0;while(s/^2//){$c++;}s/^4//;$
v.=(' ','|','_',"\n",'\\','/')[$c]}$v}sub A{$_=shift;while
($_){$d=hex chop;for(1..4){$pl.=($d%2)?4:2;$d>>=1}}$pl}$H=
"16f6da116f6db14b4b0906c4f324";print H(A($H)) # -- jonadab