Any thoughts on this?:
The PHP:
PHP Code:
function obscure($eml) // ## Email Obfuscation Function { $len = strlen($eml); $out = '<UL>'; for ($i = 0; $i < $len; $i++) {$out .= '<LI>&#'.ord(substr($eml, $i, 1)).';</LI>';} $out .= '</UL>'; return $out; }
The HTML:
HTML Code:
<A CLASS="pobox">Please contact the webmaster: <?= obscure('fake@email.com'); ?></A>
The CSS:
Code:
/* ### Obscured Email Style */
.pobox UL, LI {display: inline;
margin: 0px;
padding: 0px;
letter-spacing: 0em;}
The Result (Humans):
Please contact the webmaster: fake@email.com
The Result (Bots):
HTML Code:
<A CLASS="pobox">Please contact the webmaster: <UL><LI>f</LI><LI>a</LI><LI>k</LI><LI>e</LI><LI>@</LI><LI>e</LI><LI>m</LI><LI>a</LI><LI>i</LI><LI>l</LI><LI>.</LI><LI>c</LI><LI>o</LI><LI>m</LI></UL></A>
Obviously, you loose the whole "mailto" bonus this way. But I've found that big boys and girls can cut and paste.
OR... you can target a script mailer to add the functionality on the back end.
Trust me, I can still take it.
Last edited by Envision_frodo; 12-10-2008 at 05:58 PM..
Reason: Noob Moment
|