Download
Download Version 1.2.1We offer a programming interface (API) over HTTPS, which allows you to encrypt email addresses on the fly using PHP. Your server must support PHP and cURL.
Integration
Download the API and upload the file emailEncoder.class.php
to your webspace.
In your index.php
file, insert this line above the content:
require_once "emailEncoder.class.php";
You may have to adjust the path settings if the class is not in the same folder as the index.php.
If you want to encrypt an email address, insert the following code at the desired location and replace the email address:
$emailEncoder = new emailEncoder(); $emailEncoder->setEmail("email@example.com"); echo $emailEncoder->encode();
Result:
Options
You can set different options and combine them together. Insert these before $emailEncoder->encode()
and replace the value.
Linktext
$emailEncoder->setLinktext("Linktext");
Result:
CSS class(es)
$emailEncoder->setCssClass("first-css-class second-css-class");
Result:
ID attribute
$emailEncoder->setIdAttr("id-attr");
Result:
Inline style
$emailEncoder->setInlineStyle("color:red;");
Result: