Was looking for some dating scam filter, couldn't find anything, so here is a simple filter which detects dating scam messages:
usage:
if someone knows/has better dating scam filters, please share here.
PHP Code:
function detect_scam($text)
{
$regex_match="/(my name is|saw your profile|trusted person|nice to meet you|visit your country|relationship with you|reply back to me|contact me|send my photos|reply for details|my details and pictures|more about you|became interested|would like to meet|email me now|more about me|important to discuss|pleasure to meet you|add me|foreign contractor|official claim|soldier currently|came across|bank|money|";
$regex_match.="yahoo|gmail|inbox|hotmail|outlook";
$regex_match.=")/i";
if (preg_match_all($regex_match, $text, $matches)) {
return count($matches[0]);
}else {
return false;
}
/*if(preg_match($regex_match, strtolower($text)))
{
return true;
}
return false;*/
}
usage:
PHP Code:
$text = 'some text containing scam message';
$scam_check = detect_scam($text); //get the amount of scam matches in the text
if($scam_check>1) //you can change the number one to a higher value
{
echo 'Bad, bad scammer, go away! Grrrrr....';
}
else
{
echo 'You are a good user, you can stay!';
}
Comment