Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
php + css = obscured email?
Old 12-10-2008, 05:53 PM php + css = obscured email?
Skilled Talker

Posts: 80
Name: John
Location: Sacramento
Trades: 0
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$i1)).';</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
Envision_frodo is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-14-2008, 07:45 AM Re: php + css = obscured email?
vivekar's Avatar
Webmaster Talker

Posts: 612
Trades: 0
Nice trick. I like it.
__________________

Please login or register to view this content. Registration is FREE
(Active since 2003) |
Please login or register to view this content. Registration is FREE
vivekar is offline
Reply With Quote
View Public Profile Visit vivekar's homepage!
 
Reply     « Reply to php + css = obscured email?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10028 seconds with 12 queries