Posted By

flatearthcomms on 09/24/10


email hack spam attack

Versions (?)

Anti spam web email form

 / Published in: PHP


Stop a spam email form header injection attack - ie stop spammers from hijacking a web form to send junk mail

  1. foreach( $_POST as $value ){
  2. if( stripos($value,'Content-Type:') !== FALSE ){
  3. mail('[email protected]','Spammer Bot Attempt',$_SERVER['REMOTE_ADDR']);
  4. exit("{$_SERVER['REMOTE_ADDR']} Has been Recorded");
  5. }
  6. }

Report this snippet  

You need to login to post a comment.