Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Per Jessen
Stuart wrote: > I'm sure you could integrate SpamAssassin or similar because at the > end of the day all those systems expect is a bunch of text. Exactly. You can run SA as a daemon (spamd) and feed data to it using spamc. Works very well. The full ruleset is probably too much, but it's easy to

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Bastien Koert
On Fri, May 29, 2009 at 10:02 AM, Merlin Morgenstern 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

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Stuart
2009/5/29 Merlin Morgenstern : > > > 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. >>

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Merlin Morgenstern
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

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Tom Worster
On 5/29/09 5:36 AM, "Merlin Morgenstern" wrote: > Does somebody have an idea on how to make my function better in terms of > not detecting the string inside a word? i agree with per. learn pcre: http://us.php.net/manual/en/book.pcre.php as for successfully filtering spam by keyword matching: go

Re: [PHP] detecting spam keywords with stripos

2009-05-29 Thread Per Jessen
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 d