Location: PHPKode > scripts > strob > strob/strob.class.php
<?php
/**
* String Obfuscating Class
*/
class strob{
    /* return obfuscated string of a given string */
    function ob($raw){
        $ch=preg_split('//', $raw, -1, PREG_SPLIT_NO_EMPTY);
        $cooked='';
        for($idx=0;$idx<count($ch);$idx++)$cooked.='&#'.ord($ch[$idx]).';';
        return $cooked;
    }
    /* create a obfuscated mailto link */
    function email($email,$label=NULL){
        if($label==NULL)$label=$email;
        return '<a href="'.$this->ob('mailto:').$this->ob($email).'">'.$this->ob($label).'</a>';
    }
}
?>
Return current item: strob