PHPackages                             cocoa/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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. cocoa/captcha

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

cocoa/captcha
=============

PHP Captcha Package

v1.0(9y ago)133882MITPHPPHP &gt;=5.4

Since May 19Pushed 9y ago2 watchersCompare

[ Source](https://github.com/cocoq/captcha)[ Packagist](https://packagist.org/packages/cocoa/captcha)[ Docs](https://github.com/cocoq/captcha)[ RSS](/packages/cocoa-captcha/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

PHP Captcha Library
===================

[](#php-captcha-library)

Based on [mewebstudio/captcha](https://github.com/mewebstudio/captcha).

Preview
-------

[](#preview)

[![Preview](https://camo.githubusercontent.com/e5ebfe735c8c3845df743219a60cb26c43754c66b6547dce56f8e82c64e8b261/687474703a2f2f692e696d6775722e636f6d2f485974723734342e706e67)](https://camo.githubusercontent.com/e5ebfe735c8c3845df743219a60cb26c43754c66b6547dce56f8e82c64e8b261/687474703a2f2f692e696d6775722e636f6d2f485974723734342e706e67)

Requirements
------------

[](#requirements)

- PHP &gt;=5.4
- [Intervention Image](https://github.com/Intervention/image)

Composer Installation
---------------------

[](#composer-installation)

```
composer require cocoa/captcha

```

Usage
-----

[](#usage)

```
use Cocoa\Captcha\CaptchaBuilder;

$builder = new CaptchaBuilder;

$captcha = $builder->build();

$builder->output();
```

```
use Cocoa\Captcha\CaptchaBuilder;

$builder = new CaptchaBuilder;

$length = 5;

$captcha = $builder->build($length);

$builder->setWidth(120)->setHeight(36)->setContrast(0)->setInvert(false)->setSharpen(0)->setBgColor('#ffffff')->setBgImage(true)->setBlur(0)->setQuality(90)->setLines(3)->setAngle(10)->output();
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

Unknown

Total

1

Last Release

3329d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/508b94331d4d706b526c889ebbc164649f62ef0c128d22d7187b70d2c98765fc?d=identicon)[mx](/maintainers/mx)

---

Top Contributors

[![cocoq](https://avatars.githubusercontent.com/u/28710010?v=4)](https://github.com/cocoq "cocoq (2 commits)")

---

Tags

captcha

### Embed Badge

![Health badge](/badges/cocoa-captcha/health.svg)

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

###  Alternatives

[karser/karser-recaptcha3-bundle

Google ReCAPTCHA v3 for Symfony

1862.5M13](/packages/karser-karser-recaptcha3-bundle)[laminas/laminas-captcha

Generate and validate CAPTCHAs using Figlets, images, ReCaptcha, and more

2419.2M49](/packages/laminas-laminas-captcha)[abanoubnassem/filament-grecaptcha-field

Provides a Google reCaptcha V2 field for the Filament Forms

26126.1k2](/packages/abanoubnassem-filament-grecaptcha-field)[aryehraber/statamic-captcha

Protect your Statamic forms using a Captcha service

17205.3k](/packages/aryehraber-statamic-captcha)[mobicms/captcha

A simple PHP CAPTCHA library

2618.4k3](/packages/mobicms-captcha)[elic-dev/laravel-math-captcha

A simple math captcha for Laravel form validation.

1258.5k](/packages/elic-dev-laravel-math-captcha)

PHPackages © 2026

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