equal
deleted
inserted
replaced
593 * @return string |
593 * @return string |
594 */ |
594 */ |
595 |
595 |
596 function mask_address($email) |
596 function mask_address($email) |
597 { |
597 { |
598 return str_replace('.', ' <DOT> ', str_replace('@', ' <AT> ', $email)); |
598 $at = array(' (AT) ', ' __AT__ ', ' *AT* ', ' [AT] ', ' <AT> ', ' <__AT__> '); |
|
599 $dot = array(' (DOT) ', ' __DOT__ ', ' *DOT* ', ' [DOT] ', ' <DOT> ', ' <__DOT__> '); |
|
600 while(strstr($email, '@')) |
|
601 { |
|
602 $my_at = $at[ array_rand($at) ]; |
|
603 $email = str_replace_once('@', $my_at, $email); |
|
604 } |
|
605 while(strstr($email, '.')) |
|
606 { |
|
607 $my_dot = $dot[ array_rand($dot) ]; |
|
608 $email = str_replace_once('.', $my_dot, $email); |
|
609 } |
|
610 return $email; |
599 } |
611 } |
600 |
612 |
601 /** |
613 /** |
602 * Turn a string of text into hex-encoded HTML entities |
614 * Turn a string of text into hex-encoded HTML entities |
603 * @param string $text the text to encode |
615 * @param string $text the text to encode |