\TriTanStopForumSpam

Stop Forum Spam

By sending GET request to: http://www.stopforumspam.com/api?email=g2fsehis5e@mail.ru&username=MariFoogwoogy&f=json you get the return i.e.:

 {
     "success":true,
     "email":
         {
             "lastseen":"2009-06-25 00:24:29",
             "frequency":2,
             "appears":true
         },
     "username":
         {
             "frequency":0,
             "appears":false
         }
 }

In order to use:

 1. Require this file using i.e.: use TriTan\StopForumSpam;
 2. Set spamTolerance by directly accessing the property i.e.: TriTan\StopForumSpam::spamTolerance = 10;
 3. Verify if a user is classified as spam with the is-functions i.e.:

     if (!TriTan\StopForumSpam::isSpamBotByIpOrEmailOrUsername($ip, $email, $alias) {
         //do something.
     }

Summary

Methods
Properties
Constants
isSpamBotByIp()
isSpamBotByUsername()
isSpamBotByIpAndUsername()
isSpamBotByIpOrUsername()
isSpamBotByEmail()
isSpamBotByIpAndEmail()
isSpamBotByIpOrEmail()
isSpamBotByIpOrEmailOrUsername()
$spamTolerance
$enableDebug
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$spamTolerance

$spamTolerance : integer

A number between 0 - 100 indicating how much the confidence meter from StopFormSpam must be above.

Lesser value means lesser tolerance.

Type

integer

$enableDebug

$enableDebug : boolean

Type

boolean

Methods

isSpamBotByIp()

isSpamBotByIp(string  $ip,   $debug = false) : boolean

Parameters

string $ip
$debug

Throws

\TriTan\Exception

Returns

boolean

isSpamBotByUsername()

isSpamBotByUsername(string  $username,   $debug = false) : boolean

Parameters

string $username
$debug

Throws

\TriTan\Exception

Returns

boolean

isSpamBotByIpAndUsername()

isSpamBotByIpAndUsername(string  $ip, string  $username,   $debug = false) : boolean

Parameters

string $ip
string $username
$debug

Throws

\TriTan\Exception

Returns

boolean

isSpamBotByIpOrUsername()

isSpamBotByIpOrUsername(string  $ip, string  $username,   $debug = false) : boolean

Parameters

string $ip
string $username
$debug

Throws

\TriTan\Exception

Returns

boolean

isSpamBotByEmail()

isSpamBotByEmail(string  $email,   $debug = false) : boolean

Parameters

string $email
$debug

Throws

\TriTan\Exception

Returns

boolean

isSpamBotByIpAndEmail()

isSpamBotByIpAndEmail(string  $ip, string  $email,   $debug = false) : boolean

Parameters

string $ip
string $email
$debug

Throws

\TriTan\Exception

Returns

boolean

isSpamBotByIpOrEmail()

isSpamBotByIpOrEmail(string  $ip, string  $email,   $debug = false) : boolean

Parameters

string $ip
string $email
$debug

Throws

\TriTan\Exception

Returns

boolean

isSpamBotByIpOrEmailOrUsername()

isSpamBotByIpOrEmailOrUsername(string  $ip, string  $email, string  $username,   $debug = false) : boolean

Parameters

string $ip
string $email
string $username
$debug

Throws

\TriTan\Exception

Returns

boolean