Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

EProtect

Summary: Email obfuscation
Version: 7 April 2005
Prerequisites:
Status:
Maintainer:
Discussion: EProtect-Talk

Goal

eProtect is an email obfuscation add-on for PmWiki. It intercepts pages before they are saved, and rewrites email addresses in a protected format.

Solution

With the eProtect script [[mailto:username@domain.net]] is automatically replaced with [[hidden-email:hfre@qbznva.arg]] when you save the page you are currently editing. The actual version of this script supports also alternative linktext e.g. [[mailto:username@domain.net | Nice guy]] is then replaced with [[hidden-email:hfre@qbznva.arg | Nice guy]].

Upon viewing the page, this [[hidden-email:]] directive is interpreted by eProtect, and then translated into a small javascript which is programmed to decode the protected address. If you gave an alternative linktext then this linktext is displayed.

Viewing the source code of the page will not reveal the true email address, nor will clicking on the "Edit Page" link.

But beware: Do not use the email-address as alternative text as this would render this script useless.

About Email Obfuscation

Email obfuscation is simple method of obscuring an email address so email harvesters cannot easily extract that information from your website. Email obfuscation is not encryption, so it's not terribly difficult for someone to write a de-obfuscation script, however, my preliminary research indicated that none of the top email harvesters currently on the market have any such features. BTW: The encoding is ROT13.

Download

Installation

  1. Copy e-protect.php to your cookbook/ folder.
  2. Add this line to your config.php file: include_once('cookbook/e-protect.php');
  3. That's it! You're now protected and every [[mailto: statement is automatically converted.

Resources

I did a lot of research on spam, anti-spam, obfuscation, and email harvesters. I found quite a few sites and various methods and approaches. Here are just a few of the (better) sites that I visited.

History

  • 07-Apr-2005 Replaced str_rot13 with strtr with proper parameters. This fixes the issues with @ and with str_rot13 not being available in early versions of PHP. JoachimDurchholz
  • 07-Apr-2005 Changed install directory from local/ to cookbook/ JoachimDurchholz
  • 18-Nov-2004 Conversion and extension for use with PmWiki 2.x Klonk
  • 07-Jan-2005 Found a problem in decoding the email addresses when SideBar and main text contains emails to decode. Moved script to page header. Klonk
  • 29-Jan-2005 Reformatted html links in Resources to prevent ez2ba.com from redirecting to homepage due to trailing space (%20) after URL when page title included in double-brackets. Kevin
  • 15-Feb-2005 Added support for [[text -> mailto:target]] markup Klonk
  • 18-Feb-2005 Fixed bug (missing commenting of Javascript); now produced code is valid XHTML Klonk
  • 18-11-2004 I almost have rewritten it completely to get it working with PmWiki2. The text of this page is also almost copied from PmWiki 1.x. I just added some stuff to point out the changes I added to the script. Comments are welcome... Now I can move my homepage to PmWiki2 ;-) Klonk
  • 11-05-2004 This script was originally written by Steve Leite for PmWiki 1.x.

See Also

  • DeObMail - Unobtrusive e-mail link (de)obfuscator

Contributors

  • Steve Leite (see PmWiki 1.x Cookbook)
  • Karl Loncarek Klonk

Comments

See discussion at EProtect-Talk

User notes +2 -1: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on September 03, 2012, at 07:40 AM