Friday 15 June 2012

php spam filter not working with wildcards (asterisks) -



php spam filter not working with wildcards (asterisks) -

got problem spammers , created function filter out spam. however, if spammer using word *s*p*a*m* (with asterisks between), somehow can't filter out , when seek add together banned words list, strangely every "m" banned now.

function censor_spam($field_value) { global $setting; $spam = false; $censored_array = explode(",", trim($setting['setting_banned_words'])); foreach ($censored_array $key => $value) { $trimvalue = trim($value); if (strpos($field_value, $trimvalue) !== false) { $spam = true; } } homecoming $spam; }

are asterisks somehow irritating anti-spam function?

any ideas need alter in function fix?

php wildcard spam

No comments:

Post a Comment