UNA
Loading...
Searching...
No Matches
BxAntispamIP Class Reference
Inheritance diagram for BxAntispamIP:
BxDol

Public Member Functions

 isIpWhitelisted ($sCurIP='')
 
 isIpBlocked ($sCurIP='')
 
 blockIp ($mixedIP, $iExpirationInSec=86400, $sComment='')
 
 getIpTableDirective ($iId)
 
 getIpTableConfigValues ()
 
 getIpTableConfigTitle ($i)
 
 pruning ()
 

Protected Member Functions

 _isIpListed ($sType, $sIp)
 

Protected Attributes

 $_aIpTableConfigMap
 

Detailed Description

Blocking/whitelisting by IP using local database

Constructor & Destructor Documentation

◆ __construct()

BxAntispamIP::__construct ( )

Reimplemented from BxDol.

Member Function Documentation

◆ blockIp()

BxAntispamIP::blockIp ( $mixedIP,
$iExpirationInSec = 86400,
$sComment = '' )

Add IP to blocklist

Parameters
$sIPIP as string or long integer
$iExpirationInSecset expiration in seconds
$sCommentcomment about blocking
Returns
false on error, not false on success

◆ getIpTableDirective()

BxAntispamIP::getIpTableDirective ( $iId)

Get IP table direcitve by ID

Parameters
$sId
Returns
array with IP table directive data

◆ isIpBlocked()

BxAntispamIP::isIpBlocked ( $sCurIP = '')

Check if IP is directly bloked by IP address or by IP address range

Parameters
$sCurIPIP to check, or empty for current IP
Returns
true - if IP is blocked; false - if IP is not blocked, or feature is not enabled, or it is run under cron

◆ isIpWhitelisted()

BxAntispamIP::isIpWhitelisted ( $sCurIP = '')

Check if IP is directly whitelisted by IP address or by IP address range

Parameters
$sCurIPIP to check, or empty for current IP
Returns
true - if IP is whitelisted or under cron execution; false - if IP is not whitelisted, or feature is not enabled

◆ pruning()

BxAntispamIP::pruning ( )

Clean up expired entries

Returns
number of affected rows

The documentation for this class was generated from the following file: