PHPackages                             deschamps-jeremy/php-captcha - 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. deschamps-jeremy/php-captcha

ActiveLibrary

deschamps-jeremy/php-captcha
============================

A simple question captcha generator

1.0.2(5y ago)015Apache-2.0PHPPHP &gt;=7.3.0

Since Oct 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/DeschampsJeremy/PhpCaptcha)[ Packagist](https://packagist.org/packages/deschamps-jeremy/php-captcha)[ RSS](/packages/deschamps-jeremy-php-captcha/feed)WikiDiscussions main Synced 1mo ago

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

PhpCaptcha
==========

[](#phpcaptcha)

By [Jeremy Deschamps](https://www.jddev.net)

A simple question captcha generator

Contrib
-------

[](#contrib)

- Download the repository, in a CLI :

```
git clone https://github.com/DeschampsJeremy/PhpCaptcha.git

```

Push on the `staging` branch.

Install
-------

[](#install)

- Download the repository, in a CLI :

```
composer require deschamps-jeremy/php-captcha

```

- Import :

```
use DeschampsJeremy\CaptchaService;

```

Methods
-------

[](#methods)

### static get(): array

[](#static-get-array)

Get a captcha on list and return and array, format \['token' =&gt; int, 'base64' =&gt; string\]. This code will create an uniq token response

```
var_dump([
    0 => CaptchaService::get(),
    1 => CaptchaService::get(),
]);

array(2) {
    [0]=> array(2) {
        ["token"]=> string(28) "20201011111830_5f7ec344d119e"
        ["base64"]=> //A JPG image on base64 string
    },
    [1]=> array(2) {
        ["token"]=> string(28) "20201011111830_5f7ec344d2580"
        ["base64"]=> //A JPG image on base64 string
    }
}

```

### static isValid(string $token, string $response): bool

[](#static-isvalidstring-token-string-response-bool)

Check captcha is valid

```
var_dump([
    0 => CaptchaService::isValid("20201011111830_5f7ec344d119e", "good response"),
    1 => CaptchaService::isValid("20201011111830_5f7ec344d119e", "good response"),
    2 => CaptchaService::isValid("20201011111830_5f7ec344d2580", "bad response"),
]);

array(2) {
    [0]=> bool(true)
    [1]=> bool(false)
    [2]=> bool(false)
}

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

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 ~80 days

Total

3

Last Release

1876d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/045f3c871d976463ad7522e2acb4818fb195c7bea62eccb61510f387b6b030e4?d=identicon)[DeschampsJeremy](/maintainers/DeschampsJeremy)

### Embed Badge

![Health badge](/badges/deschamps-jeremy-php-captcha/health.svg)

```
[![Health](https://phpackages.com/badges/deschamps-jeremy-php-captcha/health.svg)](https://phpackages.com/packages/deschamps-jeremy-php-captcha)
```

PHPackages © 2026

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