Repository

Light-weight, fast, simple and powerful!
Version: 1.0.7 Released: 22 May 2013 Tags: email, contact

Actions

Maintainer

mtylerb

Community rating

 (2 votes)
Log in to vote.

Description

I was worried about placing my email addresses on the web without some sort of obfuscation routine in place. Billions of SPAM emails every day and I would like to keep my share to an absolute minimum. With this in mind, I created this Class, originally not as a plugin for Wolf CMS, but just as a Class for my other PHP projects. A recent change in a project saw me needing this plugin for Wolf CMS and here we are today.

The process in obfuscation is a mix of PHP and JavaScript. PHP is used to disassemble the email address and modify it into a random string designed to look like a simple http:// weblink. PHP uses a random string of characters to derive a math sequence that JavaScript can use for the reassembly of a working email address. For SPAMbots, your email link will look like:

<a href="https://www.nra-xllrk.vg/hqtdd" rel="nofollow" title="Tyler Beckett">Tyler Beckett</a>

I went a bit further, though, and made PHP randomize the JavaScript Variable and Function names. In the above example, "YqeDFLjJI45pWnwSd" is a function name. The only time your email address is actually displayed is when you interact with the link. Hovering your mouse over the link displays your email address, but does not modify the page source. Clicking on the link activates your Operating System's mail link behavior (perhaps opening Mozilla Thunderbird or Microsoft Outlook) and modifies the page source to show the actual email address until such time as the page is refreshed. Once refreshed, the JavaScript is re-randomized and the link is encoded again into an http:// weblink.

The encoding routine is based loosely on the ROT13 method. The characters are rotated a random number of digits based on a sequence of letters representing numbers. JavaScript then uses the same string of letters to rotate the encoded email back into its original form. Install:

Please see the project page or GitHub for further documentation.

Website

https://www.tbeckett.net/articles/plugins/mtb-obfuscate.xhtml

Copyright 2010 wolfcms.org / design by yello studio / Wolf CMS Inside