Sensibilium
Programmer
I've been looking at ways of hiding email addresses within web pages from spambots, and so far I hav found an ASP script that converts email addresses to ASCII text, so I decided to create a similar function for PHP:
Calling could be done in many ways, but here's my preferred method:
Whether this works at stopping the spambots from harvesting the email addresses I really don't know, but theoretically it should...
Anyone think this may not work as I hope?
TIA
Ahdkaw
Code:
<?PHP
function ASCIIcode($input)
{
$output = '';
for ($i=0;$i<strlen($input);$i++)
{
$output .= '&#' . ord(substr($input, $i, 1)) . ';';
}
return $output;
}
?>
Calling could be done in many ways, but here's my preferred method:
Code:
echo '<P><A href="'.ASCIIcode('mailto:me@terry.com').'">Email Me!</A>';
Whether this works at stopping the spambots from harvesting the email addresses I really don't know, but theoretically it should...
Anyone think this may not work as I hope?
TIA
Ahdkaw