Jump to content

Recommended Posts

OK - So I keep getting this same spam email; using the same word and I have decided to try to create a script that will block email from being sent if my $comment variable contains a specific word. I think my script is kind of close, but it still is not not right just yet. I was wonder if some one could take a look at it and tell me how I could fix it to work the way I want it to. Does any one know what I need to correct in my script to make it work the way I want it to.

 

 

<?php

$comment = addslashes($_POST['comment']);

$stupidspammer=array("Website","Email","Link");

while ($commment = $stupidspammer) {

echo "We Are Not Interested";
exit;

}


// mail email stuff here


?>

Link to comment
https://forums.phpfreaks.com/topic/65487-solved-email-form-word-filters/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.