2017 © Pedro Peláez
 

library php-antispam

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

image

cleantalk/php-antispam

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  • Wednesday, June 20, 2018
  • by CleanTalk
  • Repository
  • 9 Watchers
  • 19 Stars
  • 11,266 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 12 Forks
  • 2 Open issues
  • 7 Versions
  • 20 % Grown

The README.md

php-antispam

example workflow, (*1)

Latest Stable Version, (*2)

A PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math., (*3)

How API stops spam?

API uses several simple tests to stop spammers. * Spam bots signatures. * Blacklists checks by Email, IP, web-sites domain names. * JavaScript availability. * Relevance test for the comment., (*4)

How API works?

API sends a comment's text and several previous approved comments to the servers. Servers evaluates the relevance of the comment's text on the topic, tests on spam and finaly provides a solution - to publish or put on manual moderation of comments. If a comment is placed on manual moderation, the plugin adds to the text of a comment explaining the reason for the ban server publishing., (*5)

Requirements

  • PHP 5.6 and above
  • CURL support

You can unpack the archive with the plugin to the root of the site or install it using the composer, (*6)

composer require cleantalk/php-antispam

Sample SPAM test for text comment

Notice: You can use the example PHP file from ./examples/form_with_handler, (*7)

handle();
if ($api_result) { // the check fired
    if ($api_result->account_status !== 1) {
        // something wrong with your key or license, to know why read $api_result->codes
        echo 'Allowed. Spam protection disabled.'; // or do nothing
    } else {
        if ($api_result->allow === 1) {
            echo 'Allowed. Spam protection OK.'; // or do nothing
        } else {
            die('Blocked. Spam protection OK. Reason: ' . $api_result->comment); // or make your own handler
        }
    }
}
// your further code flow here
?>






frontendScript(); ?>

API Response description

API returns ($api_result) PHP object: * allow (0|1) - allow to publish or not, in other words spam or ham * comment (string) - server comment for requests. * id (string MD5 HEX hash) - unique request idenifier. * errno (int) - error number. errno == 0 if requests successfull. * errstr (string) - comment for error issue, errstr == null if requests successfull. * account_status - 0 account disabled, 1 account enabled, -1 unknown status., (*8)

Don't want to deal with all this?

Universal solution for any CMS or custom website: https://github.com/CleanTalk/php-uni, (*9)

The Versions

20/06 2018

dev-master

9999999-dev http://cleantalk.org

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  Sources   Download

GPL-3.0

api spam antispam anti-spam

16/05 2018

dev-dev

dev-dev http://cleantalk.org

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  Sources   Download

GPL-3.0

api spam antispam anti-spam

25/10 2015

2.1.2

2.1.2.0 http://cleantalk.org

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  Sources   Download

GPL-3.0

api spam antispam anti-spam

02/10 2015

2.1.1

2.1.1.0 http://cleantalk.org

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  Sources   Download

GPL-3.0

api spam antispam anti-spam

24/09 2015

2.1.0

2.1.0.0 http://cleantalk.org

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  Sources   Download

GPL-3.0

api spam antispam anti-spam

04/06 2015

dev-2.0beta

dev-2.0beta http://cleantalk.org

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  Sources   Download

GPL-3.0

api spam antispam anti-spam

18/05 2015

2.0.0

2.0.0.0 http://cleantalk.org

PHP API for antispam service cleantalk.org. Invisible protection from spam, no captches, no puzzles, no animals and no math.

  Sources   Download

GPL-3.0

api spam antispam anti-spam