Featured Links

Other Topics
Sponsored Links





Quote of the Day

"Action is the foundational key to all success."

Pablo Picasso








 




 
Featured Javascript Articles

Ask Mr. D - JavaScript
Dear Mr. D,I have noticed several websites that havea sale's message that scrolls across theirtitle bar. Another site I visited had a sale'smessage scrolling across the status bar.These messages really caught my eye. Ifigure if they are eye catching then ...

Rss Tools
Considering the ever-increasing support for RSS in online communities, we have compiled a list of resources and products that will benefit webmasters, web surfers and publishers in their quest to understand the power of RSS. RSS has rapidly become an ...

Two Easy Methods To Optimize Your JavaScript
Two Easy Methods To Optimize Your JavaScript by Steve Shaw Many web sites, even those owned by people we all think of as gurus in the Internet marketing business, have large blocks of JavaScript at the top of their web pages, sometimes running to ...




Protect Your Users' Privacy. Fight Spam.
 
On all the websites where users interact with each other, the email addresses have to be displayed. But this causes big troubles, due to the Spy Bots, who parse the websites and try to find email addresses. When they find an email address, this is added to a database, which will be soon sold to many companies that need potential customers. Then, in a few days, you will start receiving a lot of "super-offers", most of them being just damn scams, filling your inbox and making you waste a lot of time distinguishing useful emails from the spam-emails.

This is the reason why many people become members of sites using a "spam account", and I mean an email account that is used just for subscribing, and not a real and official email account. But what if you need to register on a site and you are forced to use an official email, something like support@yourdomain.com ? Should you register, though you know that soon your inbox will be full of useless Spam messages? Here comes the decision of webmasters, who may or may not try to protect their users' emails.

Many of the webmasters don't care about the consequences of showing their users' email addresses. But this can determine people not to register, as absolutely nobody wants to receive tones of Spam. On the other side, if the webmasters make efforts to protect their users' email addresses, the latter ones will surely be happy. And we all know that a happy user is a returning user!

That's why I recommend that all webmasters and site owners fight Spam and protect their users' privacy. There are 2 aspects that need to be considered: the text displayed and the link itself.

The HTML code of an email would look like: username@domain.com

To better understand the explanations, I will notate:

- mailto:username@domain.com as String1
- username@domain.com as String2.

Spy Bots try to find email addresses in both String1 and String2, so it would be best to encode them both.

The best way to hide String1 is to use JavaScript. For String2, a simple replacement between "@" and "." (dot) with other characters would be enough.
username [AT] domain [DOT] com

Because normally the user's email is taken from a table in a database, I will now show you how to quickly implement this anti-Spam solution. I will use PHP, one of the most used scripting languages nowadays. We assume that $support is the variable that contains the email address.

============================================
// we will now encode String2, replacing "@" and "."
$sup_text=str_replace("@"," [AT] ",$support);
$sup_text =str_replace("."," [DOT] ",$sup_text);

// we will now get the username from String1
$i=strpos($support,"@");
$sup_user=substr($support,0,$i);

// we will now get the domain name from String1
$sup_ext="; $i=strlen($support);
while($support[$i]!=".") { $sup_ext = $support[$i].$sup_ext; $i--; }

// we will now get the domain suffix from String1
$sup_domain="; $i--;
while($support[$i]!="@") { $sup_domain = $support[$i].$sup_domain; $i--; }

// we will now encode String1
$sup_hidden="$sup_text";

echo "Support: $sup_hidden";
============================================

Using this method, the users' emails are displayed, but it is much harder for the Spam Bots to find them. Of course, the people behind the Spam Bots can adapt the Spy Bots Engines, but parsing the pages would be much more difficult. If you also combine the solution I described with some random text replacements (in String2), you will have an anti-Spam shield that will make the email-hunters go away from your website.

Webmasters, web freelancers, forum administrators, do not hesitate! Use this method and gain your users' trust and respect. Protect their privacy and make them feel sure that their registering to your site won't make them receive hundreds of useless Spam emails.






Javascript News

Haye must switch Klitschkos for title challenge - Daily Times
LONDON: David Haye won’t be able to challenge Vitaly Klitschko for his WBC heavyweight title in June but hopes to fight his brother, Wladimir, instead. Haye and Vitaly Klitschko had agreed a June 20 fight in London but the Ukrainian now has to make ...

Israel targets Rafah tunnels - BBC Middle East
BBC journalist joins Israeli troops in Gaza (01.34) Ceasefire permits children to play (00.45) Shopping for 'basic needs' in Gaza market (01.56) Funerals held for Gaza school victims (00.49) Inside Gaza: Key sites hit by Israelis (00.39) Former ...

BBC journalist with Israeli army in Gaza - BBC News
Please turn on JavaScript. Media requires JavaScript to play. BBC journalist joins Israeli troops in Gaza (01.34) Ceasefire permits children to play (00.45) Gaza buries its dead (03.38) Rice presses hard for ceasefire (01.56) Shopping for 'basic ...

Obama attends presidential lunch - BBC News
Please turn on JavaScript. Media requires JavaScript to play. Democrat Jimmy Carter (1977-81), Mr Bush's father Republican George HW Bush (1989-93) and Democrat Bill Clinton (1993-2001) then joined them for a group photograph in the Oval Office ...

Video: Running Lines at the final "SantaLand Diaries" - Denver Post
You must be registered to comment (your comment will be saved for you while you register). It's quick (it takes about 30 seconds) and we only require your email and name. Comments that include any offensive material are prohibited. By using our site ...