Advertisement
ryanharne

PHP Email, Obfuscate, Avoid Spambot

Sep 25th, 2013
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. function comman_obfuscate($string)
  2. {
  3.     $encoded_string = '';
  4.     for ($a = 0,$b = strlen($string);$a < $b;$a++)
  5.     {
  6.         $encoded_string .= '&#'.(mt_rand(0,1) == 0 ? 'x'.dechex(ord($string[$a])) : ord($string[$a]));
  7.     }
  8.     return $encoded_string;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement