Hmmm...
What is "please enter the code you see in the drawing"-thingies? 😃
If that's the persons emailadress, this is a function to obfuscate email by javascript. I've written it into a php-function that takes two arguments: the email and the text for the mailto-link. Any non-js browsers (and the robots!) will get another syntax:
## We protect the email-addresses in the public scripts ##
function noSpam($email, $etext) {
$mArr = explode("@", $email);
if($etext != "") {
$mCode = "<script language=\"Javascript\">
<!--
a = \"".$mArr[0]."\";
b = \"".$mArr[1]."\";
document.write(\"<a href='mailto:\" + a + \"@\" + b + \"'>\");
document.write(\"".$etext."\");
document.write(\"</a>\");
//-->
</script>
<NOSCRIPT>".$mArr[0]." at ".$mArr[1]."</NOSCRIPT>";
} else {
$mCode = "<script language=\"Javascript\">
<!--
a = \"".$mArr[0]."\";
b = \"".$mArr[1]."\";
document.write(\"<a href='mailto:\" + a + \"@\" + b + \"'>\");
document.write(a + \"@\" + b);
document.write(\"</a>\");
//-->
</script>
<NOSCRIPT>".$mArr[0]." at ".$mArr[1]."</NOSCRIPT>";
}
return $mCode;
}
The javascript-enabled will get an ordinary mailto-link, the others will see:
<script language="Javascript">
<!--
a = "myemail";
b = "mydomain.com";
document.write("<a href='mailto:" + a + "@" + b + "'>");
document.write(a + "@" + b);
document.write("</a>");
//-->
</script>
<NOSCRIPT>myemail at mydomain.com</NOSCRIPT>
Not bulletproof, but it excludes the major bunch of robots that searches any page for "mailto:" and "@" for easy adding to their mailinglists.
knutm