Squiz Matrix
4.12.2
|
Static Public Member Functions | |
static | checkCaptcha ($sessionId, $solution) |
static | checkContent ($sessionId=null, $postTitle=null, $postBody=null, $authorName=null, $authorUrl=null, $authorEmail=null, $authorOpenId=null, $authorId=null) |
static | getAudioCaptcha ($sessionId=null) |
static | getImageCaptcha ($sessionId=null) |
static | getIpAddress () |
static | getServerList ($counter=0) |
static | getStatistics ($type) |
static | sendFeedback ($sessionId, $feedback) |
static | setAllowedReverseProxyAddresses ($addresses) |
static | setPrivateKey ($key) |
static | setPublicKey ($key) |
static | setServerList ($servers) |
static | setTimeOut ($timeout) |
static | setUserAgent ($newUserAgent) |
static | verifyKey () |
static | getContentTypes () |
static | loadMollom () |
static | verifySubmission ($assetid, $parameters) |
static | getMollomCaptchaKeywordReplacement ($assetid) |
static | getMollomCaptchaFieldKeywordReplacement ($assetid) |
static | getMollomCaptchaRegenLinkKeywordReplacement ($assetid, $regen_text='Regenerate security key') |
static | getMollomCaptchaAudioKeywordReplacement ($assetid) |
static | getMollomCaptchaImageKeywordReplacement ($assetid) |
static | checkCaptchaResponse ($assetid) |
static | refreshMollomSession ($assetid) |
Static Public Attributes | |
static | $default_server_list = array('http://xmlrpc3.mollom.com', 'http://xmlrpc2.mollom.com', 'http://xmlrpc1.mollom.com') |
Mollom class
This source file can be used to communicate with mollom (http://mollom.com)
The class is documented in the file itself, but you can find more documentation and examples on the docs-page (http://mollom.crsolutions.be/docs). If you find any bugs help me out and report them. Reporting can be done by sending an email to php-mollom-bugs[at]verkoyen[dot]eu. If you report a bug, make sure you give me enough ination (include your code). If you have questions, try the Mollom-forum, don't send them by mail, I won't read them.
Changelog since 1.0.1
Changelog since 1.1.0
Changelog since 1.1.1
Changelog since 1.1.2
License Copyright (c) 2008, Tijs Verkoyen. All rights reserved.
Redistribution and use in source and binary s, with or without modification, are permitted provided that the following conditions are met:
This software is provided by the author ``as is'' and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
Definition at line 79 of file mollom.inc.
|
static |
Validates the answer for a CAPTCHA
When the answer is false, you should request a new image- or audio-CAPTCHA, make sure your provide the current Mollom-sessionid. The sessionid will be used to track spambots that try to solve CAPTHCA's by brute force.
string | $sessionId | |
string | $solution |
Definition at line 231 of file mollom.inc.
|
static |
Check the value submitted for captcha
string | $assetid | Assetid of Matrix asset using the Mollom |
Definition at line 1137 of file mollom.inc.
|
static |
Check if the data is spam or not, and gets an assessment of the datas quality
This function will be used most. The more data you submit the more accurate the claasification will be. If the spamstatus is 'unsure', you could send the user an extra check (eg. a captcha).
REMARK: the Mollom-sessionid is NOT related to HTTP-session, so don't send 'session_id'.
The function will return an array with 3 elements:
string[optional] | $sessionId |
string[optional] | $postTitle |
string[optional] | $postBody |
string[optional] | $authorName |
string[optional] | $authorUrl |
string[optional] | $authorEmail |
string[optional] | $authorOpenId |
string[optional] | $authorId |
Definition at line 281 of file mollom.inc.
|
static |
Get a CAPTCHA-mp3 generated by Mollom
If your already called getAudioCaptcha make sure you provide at least the $sessionId. It will be used to identify visitors that are trying to break a CAPTCHA with brute force.
REMARK: the Mollom-sessionid is NOT related to HTTP-session, so don't send 'session_id'.
The function will return an array with 3 elements:
string[optional] | $sessionId |
Definition at line 531 of file mollom.inc.
|
static |
|
static |
Get a CAPTCHA-image generated by Mollom
If your already called getImageCaptcha make sure you provide at least the $sessionId. It will be used to identify visitors that are trying to break a CAPTCHA with brute force.
REMARK: the Mollom-sessionid is NOT related to HTTP-session, so don't send 'session_id'.
The function will return an array with 3 elements:
string[optional] | $sessionId |
Definition at line 580 of file mollom.inc.
|
static |
|
static |
Get Mollom captcha audio keyword replacement
string | $assetid | Assetid of Matrix asset using the Mollom |
Definition at line 1085 of file mollom.inc.
|
static |
Get captcha input field keyword replacement
string | $assetid | Assetid of Matrix asset using the Mollom |
Definition at line 1031 of file mollom.inc.
|
static |
Get Mollom captcha image keyword replacement
string | $assetid | Assetid of Matrix asset using the Mollom |
Definition at line 1116 of file mollom.inc.
|
static |
Get Mollom captcha keyword replacement
string | $assetid | Assetid of Matrix asset using the Mollom |
Definition at line 1007 of file mollom.inc.
|
static |
Get Mollom captcha link regenerate keyword replacement
string | $assetid | Assetid of Matrix asset using the Mollom |
string | $regen_text |
Definition at line 1062 of file mollom.inc.
|
static |
|
static |
Retrieve statistics from Mollom
Allowed types are listed below:
string | $type |
Definition at line 686 of file mollom.inc.
|
static |
Refresh Mollom session
If the form having Mollom captcha is idle for more than given time, refresh the mollom session
Definition at line 1164 of file mollom.inc.
|
static |
Send feedback to Mollom.
With this method you can help train Mollom. Implement this method if possible. The more feedback is provided the more accurate Mollom will be.
Allowed feedback-strings are listed below:
string | $sessionId | |
string | $feedback |
Definition at line 724 of file mollom.inc.
|
static |
Set the allowed reverse proxy Addresses
array | $addresses |
Definition at line 760 of file mollom.inc.
|
static |
|
static |
|
static |
|
static |
|
static |
Set the user agent
string | $newUserAgent |
Definition at line 835 of file mollom.inc.
|
static |
Verifies your key
Returns ination about the status of your key. Mollom will respond with a boolean value (true/false). False means that your keys is disabled or doesn't exists. True means the key is enabled and working properly.
Definition at line 849 of file mollom.inc.
|
static |
Verify the content for spam
string | $assetid | Assetid of Matrix asset using the Mollom |
array | $parameters |
Definition at line 923 of file mollom.inc.