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

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

qing7777/captcha
================

Hyperf Captcha Package

v1.0.0(6y ago)1181MITPHPPHP &gt;=7.2CI failing

Since Mar 25Pushed 6y agoCompare

[ Source](https://github.com/qing7777/captcha)[ Packagist](https://packagist.org/packages/qing7777/captcha)[ Docs](https://github.com/qing7777/captcha)[ RSS](/packages/qing7777-captcha/feed)WikiDiscussions master Synced today

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

Require this package with composer:

```
composer require qing7777/captcha

```

Configuration
-------------

[](#configuration)

To use your own settings, publish config.

```
php bin/hyperf.php vendor:publish qing7777/captcha

```

`config/autoload/captcha.php`

```
return [
    'default'   => [
        'length'    => 5,
        'width'     => 120,
        'height'    => 36,
        'quality'   => 90,
        'math'      => true, //Enable Math Captcha
    ],
    // ...
];
```

Example Usage
-------------

[](#example-usage)

```
    // [your site path]/Http/routes.php
    Route::any('captcha-test', function() {
        if (request()->getMethod() == 'POST') {
            $rules = ['captcha' => 'required|captcha'];
            $validator = validator()->make(request()->all(), $rules);
            if ($validator->fails()) {
                echo 'Incorrect!';
            } else {
                echo 'Matched :)';
            }
        }

        $form = '';
        $form .= '';
        $form .= '' . captcha_img() . '';
        $form .= '';
        $form .= 'Check';
        $form .= '';
        return $form;
    });
```

Return Image
============

[](#return-image)

```
captcha();
```

or

```
Captcha::create();
```

Return URL
==========

[](#return-url)

```
captcha_src();
```

or

```
Captcha::src();

```

Return HTML
===========

[](#return-html)

```
captcha_img();
```

or

```
Captcha::img();
```

To use different configurations
===============================

[](#to-use-different-configurations)

```
captcha_img('flat');

Captcha::img('inverse');
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

2291d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/009e2c5bb53e2889d72ba1b9206b688ab4166705e1f64e6fd5c3cbc350d852af?d=identicon)[qing7260](/maintainers/qing7260)

---

Top Contributors

[![qing7260](https://avatars.githubusercontent.com/u/24262028?v=4)](https://github.com/qing7260 "qing7260 (10 commits)")

---

Tags

captchaHyperf Captcha

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[bonecms/laravel-captcha

Captcha integration for Laravel

77142.2k](/packages/bonecms-laravel-captcha)[pixelopen/cloudflare-turnstile-bundle

A simple package to help integrate Cloudflare Turnstile on Symfony.

35242.6k3](/packages/pixelopen-cloudflare-turnstile-bundle)[webman/captcha

Captcha generator

1495.9k34](/packages/webman-captcha)[isszz/rotate-captcha

Rotate image captcha

801.9k](/packages/isszz-rotate-captcha)[haruncpi/laravel-simple-captcha

A laravel simple captcha package

1130.8k](/packages/haruncpi-laravel-simple-captcha)[lubosdz/yii2-captcha-extended

Extended captcha code generator for Yii2 framework with configurable obfuscation level

1018.8k](/packages/lubosdz-yii2-captcha-extended)

PHPackages © 2026

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