Answer the question
In order to leave comments, you need to log in
How to check for keywords?
How to do a proper keyword check. For example, I will specify http, https to delete where there are links, etc.
Now I do this:
// Спам слова заношу так, или из базы
$cal['key_text'] = 'спам,продам,куплю';
//Текст здесь $key_text
$key_text = explode(",", mb_strtolower($cal['key_text']));
$key_array = array_merge($key_text);
foreach($key_array as $k) {
if($k == $text) {
// код
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question