PHPackages                             augustdai/hyperf3-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. augustdai/hyperf3-captcha

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

augustdai/hyperf3-captcha
=========================

captcha 验证码 算式验证码

v1.0.2(3mo ago)12↓92.9%MITPHPPHP &gt;=8.0

Since Apr 4Pushed 3mo agoCompare

[ Source](https://github.com/augustdai/hyperf3-captcha)[ Packagist](https://packagist.org/packages/augustdai/hyperf3-captcha)[ RSS](/packages/augustdai-hyperf3-captcha/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (12)Versions (3)Used By (0)

**augustdai/hyperf3-captcha**

**Verification code generator based on hyperf3.1 high-performance coroutine framework**

hyperf3-captcha
===============

[](#hyperf3-captcha)

专为 \[**hyperf3.1**\] () 协程框架设计的灵活可定制验证码组件，用于生成和展示验证码图片。它支持多种验证码类型，包括字符验证码和数学公式验证码。您可以根据需要轻松配置验证码的外观、大小和文字内容。本组件不提供存储机制（如 session、redis、文件等），完全由您自行实现存储和验证机制，使其适应性和灵活性更强。

功能特点
====

[](#功能特点)

- 多种验证码类型：支持字符验证码和数学公式验证码，满足不同的使用场景。
- 灵活配置：提供丰富的配置选项，方便定制验证码的样式、大小和文字内容。
- 高适应性：专为 Hyperf3.1 协程框架打造，可轻松集成到您的项目中。
- 无存储机制：本组件不涉及验证码的存储和验证，完全由您根据实际情况实现，灵活自由。

安装
--

[](#安装)

使用 Composer 进行安装：

```
composer require augustdai/hyperf3-captcha
```

生成config文件
----------

[](#生成config文件)

```
php bin/hyperf.php vendor:publish augustdai/hyperf3-captcha
```

开始
--

[](#开始)

```
$config = 'default';
$result = $this->captcha->create($config);

// 将验证码的 key 存储到缓存中，设置过期时间
$cacheKey = 'captcha_' . $result['key'];
$this->setCache($cacheKey, $result['key'], $this->captcha->expire);

var_dump($result);
```

var\_dump：

```
{
    "key": "abc...",
    "img": "data:imageabcd"
}
```

Preview
-------

[](#preview)

[![Preview](/image.png)](/image.png)

贡献与支持
-----

[](#贡献与支持)

欢迎贡献代码、提交问题和建议，共同改进本验证码组件，使其更加强大和灵活。如果您在使用过程中遇到任何问题或者需要帮助，请随时联系我们或者提交 Issue。

许可证
---

[](#许可证)

本项目基于 MIT 许可证 发布，可以自由使用、修改和分发。

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance82

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity40

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

Total

2

Last Release

92d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/206428f195ff30eadf98614f63041df52fb5b17cca7a6cae08516b680b83bea5?d=identicon)[augdai](/maintainers/augdai)

---

Tags

hyperf3.1php8.0x

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.8M39](/packages/laravolt-avatar)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[azuracast/azuracast

The AzuraCast self-hosted web radio station management suite.

3.9k27.8k](/packages/azuracast-azuracast)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19346.6k3](/packages/symfony-ux-cropperjs)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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