Euler
Joined: 02 Sep 2004
Posts: 109
|
| Love Thy Users |
|
|
Here's a subtle and effective way to love your users in php.
Most forums/blogs/webapps provide optional contact info for users. For instance, here on h4m you can set your acct so that when people view your profile, they get a mailto link pointing at your email address.
The down side is that the blind among us craft spiderbots to harvest these mailto address and sell them to spammers.
Here is a way to transparently break their bots. The blind will eventually adapt their bots in their effort to harm your users for cash. Until then, share the love!
code:
function obscure_text($text) {
$i=0;
do {
$codechar = substr($text,$i,1);
$code = ord($codechar);
if($code != "�") {
$cryptxt = $cryptxt."&#$code";
}
$i++;
} while($codechar != ""); // End of do-while loop
return $cryptxt;
}
Now, every time your engine wants to display an email address, pump the address through this thing first. Bots will be confused and love will again transcend the selfish actions of the heedless.
|
Mon Mar 14, 2005 8:56 pm
|
|
|
Thermit
Site Admin

Joined: 11 Aug 2004
Posts: 272
|
nospam@seo1.net
Hey, that's pretty cool!
I'm gonna have to integrate that.
Most people keep their email off, but this is a great option for the brave or innocent...
|
Tue Mar 15, 2005 4:38 am
|
|
|

|
|
All times are GMT. The time now is Sat Jul 31, 2010 8:42 pm
|
|
|
|
| |