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


  1. Either:
    • Go to ‘Plugins > Add New’ and search for PHPEnkoder
    • Download and extract from the plugin
      directory and upload enkoder.php to the
      /wordpress/wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Configure the plugin through its menu in Settings


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.

I opened up the inspector and I saw my supposedly encoded text. What gives?

The inspector shows the current live state of the DOMhow the page
looks right now. Once PHPEnkoder’s generated JavaScript runs, then the
DOM will include all of the secrets. If you check the source, you’ll
see that your secrets are safe from (naively) prying eyes.

Other questions?

See the webpage for more information.


Октябрь 9, 2019
This is the FIRST (and still only) email encoding plugin that gets the job done. Thanks!
Февраль 11, 2017
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>
Октябрь 20, 2016
Use it on several sites, works out of the box.
Read all 8 reviews

Contributors & Developers

“PHPEnkoder” is open source software. The following people have contributed to this plugin.


Translate “PHPEnkoder” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.


See the webpage for more
information on changes.