Additions:
The aliroSpamHandler class is a singleton that provides spam checking services. Specific spam defences are implemented as plugins, and the protocol for communication with spam plugins is described in the
anti-spam protocol. It is possible to install more than one spam defence plugin. If no spam defence plugin is installed, then aliroSpamHandler will be ineffective, but applications can still make calls to it. If something is classed as spam with a high degree of probability, then the source IP address is blacklisted so that it can be blocked with low overhead. The singleton object can be obtained by:
Deletions:
The aliroSpamHandler class is a singleton that provides spam checking services. Specific spam defences are implemented as plugins. It is possible to install more than one spam defence plugin. If no spam defence plugin is installed, then aliroSpamHandler will be ineffective, but applications can still make calls to it. If something is classed as spam with a high degree of probability, then the source IP address is blacklisted so that it can be blocked with low overhead. The singleton object can be obtained by:
Additions:
array = checkContentForSpam ($identifier='', $title='', $body='', $authorName='', $authorURI='', $authorEmail='', $authorIP='', $authorOpenID='', $authorID=0, $articlePermalink='', $articleDate=0, $trusted=false)
Deletions:
array = checkContentForSpam ($identifier='', $title=, $body=, $authorName=, $authorURI=, $authorEmail=, $authorIP=, $authorOpenID=, $authorID=0, $articlePermalink=, $articleDate=0, $trusted=false)
Additions:
array = checkContentForSpam ($identifier='', $title=, $body=, $authorName=, $authorURI=, $authorEmail=, $authorIP=, $authorOpenID=, $authorID=0, $articlePermalink=, $articleDate=0, $trusted=false)
Deletions:
array = checkContentForSpam ($identifier=, $title=, $body=, $authorName=, $authorURI=, $authorEmail=, $authorIP=, $authorOpenID=, $authorID=0, $articlePermalink=, $articleDate=0, $trusted=false)
No differences.
aliroSpamHandler
The aliroSpamHandler class is a singleton that provides spam checking services. Specific spam defences are implemented as plugins. It is possible to install more than one spam defence plugin. If no spam defence plugin is installed, then aliroSpamHandler will be ineffective, but applications can still make calls to it. If something is classed as spam with a high degree of probability, then the source IP address is blacklisted so that it can be blocked with low overhead. The singleton object can be obtained by:
$spammer = aliroSpamHandler::getInstance();
Methods to be called from applications handling data that could be spam are shown below. Other methods exist subject to the spam plugins available, including captcha processing.
array = checkContentForSpam ($identifier=, $title=, $body=, $authorName=, $authorURI=, $authorEmail=, $authorIP=, $authorOpenID=, $authorID=0, $articlePermalink=, $articleDate=0, $trusted=false)
All parameters are optional; as many as possible should be supplied. The array returned provides information as follows:
'status' => ham | spam | unknown
'spaminess' => floating point number 0 to 1, the higher the number the more probable the test indicates spam
'identifier' => can be used in subsequent calls to identify the same item
changeSpamStatus ($identifier, $newStatus)
This method can be used to change the spam status of an item. If possible, the change will be fed back to the spam defence service. In particular, changing to "spam" effectively enters a report of having identified spam. This should only be used on the authority of trusted users, such as administrators.
bool = isBlackListed ( $ip )
Tells whether a particular IP address is black listed.