Lilaea Media


ob·fus·cap·er·y (ob-fuh-skeyp-uh-ree)noun, plural -er·ies

  1. Any one of many programmatic methods intended to render elements difficult to decipher or use automatically. Captcha is just another obfuscapery designed to make my life difficult.
  2. A neologism formed from the combination of "obfuscation," "escape" and "query."

Ok, we made that up, but ...

In the never-ending quest to thwart the assault of robot spiders scraping the Internet for email addresses, developers have produced many solutions that obfuscate emails and reassemble them using Javascript. The flaw in this logic is the assumption that the robots cannot perform the exact manipulation the browsers do, and that elaborate disassembling and reassembling somehow impedes their evil pillaging.

Enter Obfuscapery -- the email obfuscator that combines human interaction, the power of JQuery, and the nearly mystical properties of the XOR bitwise operator. The result is a simple, lightweight and portable plug-in that can be used site-wide with minimal effort without encryption libraries or special PHP builds.


  1. A website running PHP
  2. The JQuery library
  3. This script

How It Works

  1. The PHP page includes a script that renders a <div> tag containing each email address, encrypted using the Obfuscapery library. Each email link must be enclosed in a specially marked <div> container as well.
  2. JQuery binds the document to the onMousemove event so that human interaction is required to decrypt the addresses.
  3. As soon as a mouse motion is detected, JQuery executes an XHR call to the Obfuscapery include containing the first of the encrypted emails.
  4. Obfuscapery returns the decryption key as the XHR response.
  5. JQuery decrypts all of the emails on the page and renders them by changing the contents of each email <div> container.

Simple, Elegant and Cool!

What more can you ask from a tidbit of web geekery? Why go to all the trouble? First, just having the XHR return the email does not solve the problem, because a robot could just as easily hit the include script directly. Second, your website's Inbox will thank you. You can see it in action on our demo page.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks