Re: detecting spam keywords with stripos

From: Date: Fri, 29 May 2009 10:35:11 +0000
Subject: Re: detecting spam keywords with stripos
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-293341@lists.php.net to get a copy of this message
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 -- Per Jessen, Zürich (17.1°C)

« previous php.general (#293341) next »