PHPackages                             kilofox/hyperf-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. kilofox/hyperf-captcha

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

kilofox/hyperf-captcha
======================

A captcha component for Hyperf.

1.1.0(6mo ago)0227MITPHPPHP &gt;=7.4

Since Nov 18Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/muffetlab/hyperf-captcha)[ Packagist](https://packagist.org/packages/kilofox/hyperf-captcha)[ RSS](/packages/kilofox-hyperf-captcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Captcha for Hyperf
==================

[](#captcha-for-hyperf)

This is the Captcha component for Hyperf 2.

[![Release Version](https://camo.githubusercontent.com/a9e9d7205a0d1b9c77de95ae001d353e892f1cb8b06569fe2d994ad8df983df9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d75666665746c61622f6879706572662d636170746368612e737667)](https://github.com/muffetlab/hyperf-captcha/releases/latest) [![Latest Release Download](https://camo.githubusercontent.com/da2f59495adc59a1b0dbe7bf0f8a3965bfddb0b277399ea32517f884b21245c7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f6d75666665746c61622f6879706572662d636170746368612f6c61746573742f746f74616c2e737667)](https://github.com/muffetlab/hyperf-captcha/releases/latest) [![Total Download](https://camo.githubusercontent.com/0a12bee738a3ef8646aae11e19c9dfdf33a3f7ae920815620d464590c720adf6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f6d75666665746c61622f6879706572662d636170746368612f746f74616c2e737667)](https://github.com/muffetlab/hyperf-captcha/releases)

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

[](#installation)

```
$ composer require muffetlab/hyperf-captcha

```

Publish
-------

[](#publish)

```
$ php bin/hyperf.php vendor:publish muffetlab/hyperf-captcha

```

Usage
-----

[](#usage)

Instantiate captcha factory:

```
use Hyperf\Utils\ApplicationContext;
use Muffetlab\Captcha\CaptchaFactory;

$captchaFactory = ApplicationContext::getContainer()->get(CaptchaFactory::class);

```

> **Note:** Since version 1.1.0, the package namespace has been changed from `Kilofox` to `Muffetlab`. If you're upgrading from a previous version, please update your code accordingly:

```
// Old namespace (before 1.1.0)
use Kilofox\Captcha\CaptchaFactory;

// New namespace (since 1.1.0)
use Muffetlab\Captcha\CaptchaFactory;

```

Render a captcha:

```
$key = $this->request->query('key');
$captcha = $captchaFactory->create($key);

return $captcha->render();

```

Validate the captcha:

```
$key = $this->request->input('key', '');
$captcha = $this->request->input('captcha', '');

$captchaFactory->validate($key, $captcha);

```

Supported Captcha Styles
------------------------

[](#supported-captcha-styles)

- alpha
- basic
- black
- math
- riddle
- word

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance66

Regular maintenance activity

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Every ~721 days

Total

3

Last Release

198d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88fd4018e1fe23be3bafa2162ec8e73edc7cdbabcf37747ae2c0080895218ea3?d=identicon)[muffetlab](/maintainers/muffetlab)

---

Top Contributors

[![muffetlab](https://avatars.githubusercontent.com/u/1018625?v=4)](https://github.com/muffetlab "muffetlab (28 commits)")

---

Tags

phpcaptchahyperf

### Embed Badge

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

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

###  Alternatives

[krowinski/one-click-captcha

Simple captcha that requires from user to only click a cut circle on image with several other circles. You can customize color of circles, background, width and height of image. Its very lightweight require no js just simple form in html and php gd extension.

131.7k](/packages/krowinski-one-click-captcha)

PHPackages © 2026

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