Your Ad Here

Posted By

misteroneill on 09/01/09


Tagged

email header detection


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Check For Email Headers


 / Published in: PHP
 

URL: http://www.misteroneill.com

This function simply returns a Boolean value based on whether or not some email header values are inserted into a string. Helps prevent spam bots from using a form.

  1. function has_email_headers($input) {
  2. return preg_match("/(%0A|%0D|\n+|\r+)(content-type:|to:|cc:|bcc:)/i",$input);
  3. }

Report this snippet  

You need to login to post a comment.