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

# CleanTalk php-antispam: Lightweight Spam Protection for PHP Apps

example workflow, (*1)

Latest Stable Version, (*2)

The Invisible protection from spam, no captcha, no recaptcha, no puzzles, no math captcha.

API for antispam service cleantalk.org, (*3)

Requirements

  • PHP 5.6 and above
  • CURL support

How we stop spam?

PHP Anti-Spam library providing invisible spam protection for your websites, registration forms, and comment sections. CleanTalk API offers an effective CAPTCHA alternative that silently blocks spam without interrupting your users' experience., (*4)

When users submit forms on your website form, the form data is securely sent to CleanTalk’s cloud servers. CleanTalk analyzes submissions using advanced heuristics. CleanTalk then returns a real-time verdict— legitimate requests or spam., (*5)

You are free to do anything with spam, or just allow as to block spam (we will interrupt desirable request)., (*6)

CleanTalk vs CAPTCHA

Feature CleanTalk Anti-Spam Traditional CAPTCHA
User Interaction 100% invisible to users Requires solving puzzles or clicks
Form Compatibility Works with any PHP form Often requires additional scripts
Speed Instant cloud check Slower due to user interaction
Accessibility Fully accessible, no visual tests Often inaccessible to screen readers

CleanTalk is a PHP spam filter and a captcha-free alternative that boosts UX and protects your forms with zero friction., (*7)

Interesting? Let's make some settings (it will take few minutes)

Step 1 - install our SDK (2 variants ability)

Through composer install OR through download zip arhive and unzip it to root directory (with your index.php), (*8)

composer require cleantalk/php-antispam

Step 2 - add CleantalkAntispam handler (middleware/interception) to your form handler (action)

$apikey = ''; // get it here cleantalk.org (free trial)
$email_field = $_POST['email']; // get it from your form
$cleantalk_antispam = new CleantalkAntispam($apikey, $email_field);
$api_result = $cleantalk_antispam->handle();

Step 2.1 - add js lib to your html template

<script src="https://moderate.cleantalk.org/ct-bot-detector-wrapper.js"></script>

Need for gathering frontend data., (*9)

Step 3 - do whatever you want with cloud result

For example add die block for spam., (*10)

if ($api_result && $api_result->allow === 0) {
    die('Blocked. Spam protection OK. Reason: ' . $api_result->comment);
    // or make your own actions/logs/messages ...
}

Step 4 (not required) - we prepare for you special troubleshooting method

To find possible problems, just add follow snippet after getVerdict method., (*11)

// TROUBLESHOOTING: logging the suggestions
error_log($cleantalk_antispam->whatsWrong(true));

In example file you can see context., (*12)

Step 5 (not required) - if you have any question, please, feel free to ask it in issue here or in our tiket system

Examples

Don't want to deal with all this?

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

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