Re: detecting spam keywords with stripos
| From: | Bastien Koert | Date: | Fri, 29 May 2009 14:13:04 +0000 |
| Subject: | Re: detecting spam keywords with stripos | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-293348@lists.php.net to get a copy of this message | ||
On Fri, May 29, 2009 at 10:02 AM, Merlin Morgenstern
<merlin_x@fastmail.fm>wrote:
>
>
> Per Jessen wrote:
>
>> Merlin Morgenstern wrote:
>>
>> Hi there,
>>>
>>> I am matching text against an array of keywords to detect spam.
>>> Unfortunatelly there are some false positives due to the fact that
>>> stripos also finds the keyword inside a word.
>>> E.G. "Bewerbung" -> "Werbung"
>>>
>>> First thought: use strpos, but this does not help in all cases
>>> Second thought: split text into words and use in_array, but this does
>>> not find things like "zu Hause" or "flexible/Arbeit"
>>>
>>
>> First thought - use Spamassassin.
>> Second thought - use regexes.
>>
>> /Per
>>
>>
>
> sorry this is a different scneario. I do need to to it this way in my case.
> It is about spam inside user postings.
>
> Any ideas?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Regex is your best bet, but nothing will be fool proof. Case in point (shit,
shiite, sh*t, s**t, merde, Scheiße! <a>s</a> and so on)
--
Bastien
Cat, the other other white meat