dating scam filter php

Started on the old forum in October 2017 · view the original in the archive · old links redirect here

4 replies · 88 views · started 9 years ago · 1 min read

4 participants
GumSlone Administrator Principal · 1,690 posts #1

Was looking for some dating scam filter, couldn't find anything, so here is a simple filter which detects dating scam messages:

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:

$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!';
}

if someone knows/has better dating scam filters, please share here.

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

tupac Developer · 95 posts #2

I think this code is simply perfect bro, because it fully captures the words that scanners would use to scam people, and also the most popular emails now that they try doing it through.

morse Senior · 364 posts #3

Those dating scammers are becoming a nuisance every passing day. Since they cannot automate registrations at my place, they put in manual efforts and thus are difficult to catch. You code can suffice for sometime, but I have seen them reinventing almost on a daily basis.

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

GumSlone Administrator Principal · 1,690 posts #4

i use this code at a dating site in the inbox page, it doesn't block anyone, it just warns the user who receives the message, that the automatic scam filter system has marked the message as a scam, if its correct, the user should report the scammer to the site administration.

Advertise your mobile site for FREE with AdTwirl

External image (may be gone)

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close