<?php

defined('MAXIMUS') or die ('Access denied encode email MAXIMUS directly...');

  $finished = "";
  for($i=0; $i<strlen($email); ++$i) {
    $n = rand(0, 1);
    if($n) {
      $finished .= '&#x'.sprintf("%X",ord($email{$i})).';';
    }
    else {
      $finished .= '&#'.ord($email{$i}).';';
    }
  }
  return $finished;