PHPEnkoder is a port of the excellent Hivelogic
to PHP and, more specifically,
to WordPress. It is used to display text in a way that users can see
and bots can’t.

The encoding system is directly and unabashedly stolen from the
BSD-licensed source of Hivelogic Enkoder, which works by randomly
encoding a piece of text and sending to the browser self-evaluating
Javascript that will generate the original text. This works in two
ways: first, a bot must first have a fairly complete Javascript
implementation (in particular, it must have eval); second, the
decoding process can be made arbitrarily computationally
intensive. This is similar to the idea of charging computational
payments to send e-mail, only this is actually implemented.

By default, PHPEnkoder scrambles e-mails in plaintext and in mailto:
links. It additionally provides a shortcode for manual scrambling,
used like so: [enkode text="shown to non-JS browsers"]this will be


Why doesn’t PHP Enkoder work in the excerpt?

WordPress creates excerpts by simply stripping tags from truncated
content. This results in some Javascript-protecting comments appearing
in the excerpt text, as there isn’t a convenient way to determine if
content being rendered is meant for an excerpt or the page. For now, a
customizable message appears; by default, it will be rendered as /*
email hidden; JavaScript is required */. Any ideas for workarounds
would be appreciated; please send them along.

Other questions?

See the webpage for more information.


Awesome. Tried all other plugins, this worked instantly


I needed to hide email addresses in conjunction with plugin Team Showcase. Tried all other plugins, and they failed to work within the data fields of this plugin. This plugin worked right away after activation. The email is clickable in chrome windows and android. In code it looks like this. Eat your heart out spammers. <span id="enkoder_3_824968296">email hidden; JavaScript is required</span><script type="text/javascript"> /* <!-- */ function hivelogic_enkoder_3_824968296() { var kode="kode=\"110 114 103 104 ... 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i]-3))}kode=x;";var i,c,x;while(eval(kode)); } hivelogic_enkoder_3_824968296(); var span = document.getElementById('enkoder_3_824968296'); span.parentNode.removeChild(span); /* --> */ </script>



Use it on several sites, works out of the box.

Read all 7 reviews


See the webpage for more
information on changes.

Contributors & Developers

This is open source software. The following people have contributed to this plugin.


Browse the code