Download the PHP package cleantalk/php-antispam without Composer

On this page you can find all versions of the php package cleantalk/php-antispam. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-antispam

CleanTalk php-antispam: Lightweight Spam Protection for PHP Apps

============

example workflow

Latest Stable Version

Invisible spam protection: no CAPTCHA, puzzles, or math tests

A PHP client for the CleanTalk anti-spam API

If you find this project useful, please consider starring it on GitHub ⭐. It helps us improve and maintain the project.

Requirements

How does it stop spam?

This PHP library provides invisible spam protection for websites, registration forms, and comment sections. The CleanTalk API is a CAPTCHA alternative that detects spam without interrupting your users.

When a user submits a form, the library securely sends the form data to CleanTalk's cloud servers for analysis. CleanTalk then returns a real-time verdict identifying the submission as legitimate or spam. Your application decides how to handle that verdict.

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 No visual tests Can be difficult for screen-reader users

CleanTalk is a PHP spam filter and CAPTCHA-free alternative that protects your forms without adding friction for users.

Getting started

Setup takes only a few minutes.

Step 1: install the SDK

Install the SDK with Composer:

Alternatively, download the ZIP archive and extract it into your project directory.

Step 2: configure your API key

First, copy your API key from your CleanTalk dashboard.

Make it available to PHP as an environment variable:

Name Value
CLEANTALK_API_KEY Your CleanTalk API key

On managed hosting, add it in the Environment variables or Secrets section of your hosting control panel, then restart the application if required.

If your application already loads a .env file, add:

PHP does not load .env files by itself; this option works only when your application or framework includes a dotenv loader. Do not put the API key in your PHP files or commit it to source control.

Step 3: add the CleanTalk handler to your form handler

Add the handler to your PHP code:

Step 4: add the JavaScript library to your HTML template

The library collects frontend data used for bot detection.

Enable the event token in your PHP handler:

Step 5: handle the API verdict

For example, stop processing when CleanTalk identifies a submission as spam:

Step 6 (optional): troubleshoot the integration

To identify possible configuration problems, log the improvement suggestions after calling handle():

See the complete form-handler example for context.

Step 7 (optional): get help

If you have questions, open a GitHub issue or contact us through our ticket system.

Examples

Looking for a universal integration?

See php-uni for a universal solution for CMS platforms and custom websites.

Websites that trust CleanTalk!

CleanTalk Anti-Spam Rating

Learn more about CleanTalk as a reCAPTCHA alternative.


All versions of php-antispam with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cleantalk/php-antispam contains the following files

Loading the files please wait ...