add emailEncode function

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8989 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
devjin 2011-09-02 06:44:05 +00:00
parent d58e4f32b2
commit 4560ee425c

View file

@ -504,6 +504,14 @@
return $string;
}
function getEncodeEmailAddress($email) {
$return = '';
for ($i=0,$c=strlen($email);$i<$c;$i++) {
$return .= '&#' . (rand(0,1)==0 ? ord($email[$i]) : 'X'.dechex(ord($email[$i]))) . ';';
}
return $return;
}
/**
* @brief prints debug messages
* @param debug_output target object to be printed