Forum Moderators: open
<a href="mailto:<!--#exec cgi="email.pl" -->"><!--#exec cgi="email.pl" --></a> Here is the script:
#!/usr/local/bin/perl
#your path to perl$email = 'l_ttleman@yahoo.com'; #your email
print "Content-type: text/html\n\n";
if (
$ENV{'HTTP_USER_AGENT'} =~ /^Mozilla/ &&
($ENV{'HTTP_ACCEPT_LANGUAGE'} or $ENV{'HTTP_ACCEPT_ENCODING'=~ /gzip/})
){
print $email;
}
##There are a couple of bots that use a local referer to try to spoof scripts,
##so you *may* want to comment out this elsif
elsif ($ENV{'HTTP_REFERER' =~/$ENV{'SERVER_NAME'}/ }){
print $email;
}
else {
$email =~ s/\@/_\'AT\'_/;
$email =~ s/\./_\'D0T\'_/;
print $email;
}
Of course you could also adapt it to work from within a script as a subroutine.
Littleman, don't forget Opera users :):
$ENV{'HTTP_USER_AGENT'} =~ /^Mozilla¦^Opera/ &&