API

Download

Download Version 1.1.4

We 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.

Linktext
To set a linktext insert the following line before $emailEncoder->encode() and replace the text.

$emailEncoder->setLinktext("Linktext");

Result:

CSS class(es)
To set CSS class(es) insert the following line before $emailEncoder->encode() and replace the class(es).

$emailEncoder->setCssClass("first-css-class second-css-class");

Result: