PHPackages                             andkab/php-turnstile - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. andkab/php-turnstile

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

andkab/php-turnstile
====================

API Implementation of CloudFlare Turnstile for PHP

1.0.1(3y ago)117.3k↓37.5%MITPHPPHP &gt;=7.0

Since Dec 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/andkab/php-turnstile)[ Packagist](https://packagist.org/packages/andkab/php-turnstile)[ Docs](https://github.com/andkab/php-turnstile)[ RSS](/packages/andkab-php-turnstile/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

API Implementation of [Cloudflare turnstile](https://www.cloudflare.com/products/turnstile/) for PHP

Installation
------------

[](#installation)

```
composer require andkab/php-turnstile
```

Usage
-----

[](#usage)

```
require_once '../vendor/autoload.php';

use andkab\Turnstile\Turnstile;

$turnstile = new Turnstile('secret key');
$verifyResponse = $turnstile->verify($_POST['cf-turnstile-response'], $_SERVER['REMOTE_ADDR']);

if ($verifyResponse->isSuccess()) {
    // successfully verified captcha resolving
} elseif ($verifyResponse->hasErrors()) {
    foreach ($verifyResponse->errorCodes as $errorCode) {
        echo $errorCode . '\n';
    }
} else {
    // unknown reason of failure resolving of captcha
}
```

```
>

            check

```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1250d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fbe0b3d6d38ce3af9b93debfaf08e81908bb6eda196a5fea62f0c26bc1c799b?d=identicon)[andkab](/maintainers/andkab)

---

Tags

captchacloudflareturnstile

### Embed Badge

![Health badge](/badges/andkab-php-turnstile/health.svg)

```
[![Health](https://phpackages.com/badges/andkab-php-turnstile/health.svg)](https://phpackages.com/packages/andkab-php-turnstile)
```

###  Alternatives

[google/recaptcha

Client library for reCAPTCHA, a free service that protects websites from spam and abuse.

3.6k89.1M222](/packages/google-recaptcha)[derekcodes/turnstile-laravel

A Laravel package to facilitate the server side validation of Cloudflare's Turnstile captcha service.

57118.4k](/packages/derekcodes-turnstile-laravel)[usarise/turnstile

PHP library for Turnstile, is Cloudflare’s smart CAPTCHA alternative. It can be embedded into any website without sending traffic through Cloudflare and works without showing visitors a CAPTCHA.

2393.5k6](/packages/usarise-turnstile)[afatmustafa/filamentv3-turnstile

A plugin to help you implement the Cloudflare Turnstile into your Filament panels.

1525.8k](/packages/afatmustafa-filamentv3-turnstile)[laragear/turnstile

Use Cloudflare's no-CAPTCHA with HTTP/3 in your Laravel application.

684.5k](/packages/laragear-turnstile)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
