function banned_words_chk($phrase) { global $conn, $config; $query = "SELECT word from bans_words"; $executequery = $conn->Execute($query); $bwords = $executequery->getarray(); $found = 0; $words = explode(" ", $phrase); foreach($words as $word) { foreach($bwords as $bword) { if($word == $bword[0]) { $found++; } else { $pos2 = strpos($word, $bword[0]); if($pos2 !== false) { $found++; } } } } if($found > 0) { return true; } else { return false; } } ------------------------------------------------------------- if you helpful my code please donate some few amount to developing and free to post. -------------------------------------------------------------
Comments
Post a Comment