I use code below to check if comment contains any word in array below. It returns true if detect word.
$blacklist = array("fuck","shit","pussy", "mail.ru","viagra pill", "bitcoin", "конце", "pharmacy", "bad credit","casinos");
function checkblacklist($commnetct) {
foreach ($blacklist as $word) {
if (strpos($commnetc, $word) !== FALSE) {
return true;
break;
}
}
}
Then I use
if(checkblacklist($stringcomment)) {
}
Can you help me to check if something wrong because it does not work
$commnetctand in your check you are using$commnetc.breakafter thereturnas it will never get there.mail.ru?))))