This should be a spambot safe way to return emails out on a webpage, it prints the email out with javascript with random substrings.
function InsertMail($mail) { if ($mail=='') return ''; $mail = str_replace(array('@',':','.'), array('@',':','.'), $mail); $len = strlen($mail); $i=0; while($i< $len) { $c = mt_rand(1,4); $par[] = (substr($mail, $i, $c)); $i += $c; } $join = implode('"+ "', $par); return '<script language="javascript"> <!-- document.write("'.$join.'") //--> '; }
Source: http://dk2.php.net/manual/da/function.htmlentities.php#76049