HTML_Crypt

HTML_Crypt

The HTML_Crypt provides methods to encrypt text, which can be later be decrypted using JavaScript on the client side This is very useful to prevent spam robots collecting email addresses from your site, included is a method to add mailto links to the text being generated

A basic example to encrypt an email address
// encrypt '[email protected]'
// with offset 8
$c = new HTML_Crypt('[email protected]', 8); 

// add <a href="mailto:"></a> around this email
$c->addMailTo(); 
 
// output the javascript wich write the decrypted email.
$c->output();