2

protectmail

protect_mail
SYNOPSIS

protect_mail($s)

DESCRIPTION
CODE
  1. function protect_mail($s) {
  2.     $injections = array(
  3.     '(\n+)',
  4.     '(\r+)',
  5.     '(\t+)',
  6.     '(%0A+)',
  7.     '(%0D+)',
  8.     '(%08+)',
  9.     '(%09+)'
  10.     );
  11.     $reg = implode('|', $injections);
  12.     $reg = "/$reg/";
  13.  
  14.     return preg_replace($reg, '' ,$s);
  15. }
SEE ALSO

ismailallowed, ismailinjected

Comments

To add a comment, click here.