Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Pablo Gazmuri  >  MailCrypter  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example script
Class: MailCrypter
Easily scramble mailto links to avoid harvesting.
Author: By
Last change: updated file
Date: 12 years ago
Size: 529 bytes
 

Contents

Class file image Download
<?php
//    MailCrypter Class Example Usage:

    
include('MailCrypter.php');

    
//instantiate new MailCrypter object
    
$crypt = new MailCrypter();

    
//echo a scrambled mailto: link
    
echo $crypt->addMailTo("someone@somewhere.com");

    echo 
"<br>";

    
//echo as many links as you want
    
echo $crypt->addMailTo("someone-else@somewhere-else.com");


    
//echo the javascript code that descrambles all written links
    //note: you must call writeScript AFTER echoing all the scrambled links on your page
    
$crypt->writeScript();