Help with my Stop words script, Please
I have some spam submissions happening on my site and I want them to stop. To do this I have decided to check for words in a string and if they match then it will not submit that data. The thing is I am not quite sure how to put this together.
I think I have the structure write or nearly write, but then using the functions to make it all work is a bit dazling to me.
What I want in the above script is for it to loop through the $stopwords list while trying to match the words with the $text string. If there is a match with any words in the $stopwords list then it will echo "Spam" and if there is no match it will echo "No Spam".
$stopwords = "games,gambling,about";
$text = "nothing about it most that most don't know which ones don and just discovered normally thinks they can make quick buck two well's not";
$wordex = preg_match();
echo "No Spam";
How can I modify my script to do that.