PHPackages                             tinywan/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. [Image &amp; Media](/categories/media)
4. /
5. tinywan/captcha

ActiveLibrary[Image &amp; Media](/categories/media)

tinywan/captcha
===============

base64 image verification captcha library for webman plugin

v0.0.4(3y ago)85.9k↑200%41MITPHPPHP &gt;=7.2

Since Mar 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Tinywan/webman-captcha)[ Packagist](https://packagist.org/packages/tinywan/captcha)[ RSS](/packages/tinywan-captcha/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (1)

webman captcha plugin
=====================

[](#webman-captcha-plugin)

[![Latest Stable Version](https://camo.githubusercontent.com/466e241dd175c2ad4dd9d4c8adfd67834c69d594ded8cdcabb98e1145f73776e/687474703a2f2f706f7365722e707567782e6f72672f74696e7977616e2f636170746368612f76)](https://packagist.org/packages/tinywan/captcha)[![Total Downloads](https://camo.githubusercontent.com/c88fc00e8babbdc23ba96addac856f0b841d53b4c1f3838d7be1b3a88d19bc2a/687474703a2f2f706f7365722e707567782e6f72672f74696e7977616e2f636170746368612f646f776e6c6f616473)](https://packagist.org/packages/tinywan/captcha)[![Daily Downloads](https://camo.githubusercontent.com/a3b21118e406e846f7cb67f054ee72864c4c0705d457c70068215372d9450bfd/687474703a2f2f706f7365722e707567782e6f72672f74696e7977616e2f636170746368612f642f6461696c79)](https://packagist.org/packages/tinywan/captcha)[![Latest Unstable Version](https://camo.githubusercontent.com/d9f62a572e9e2fa263219a9278932439a5a0da7ab54566809707cd2e68ae7a08/687474703a2f2f706f7365722e707567782e6f72672f74696e7977616e2f636170746368612f762f756e737461626c65)](https://packagist.org/packages/tinywan/captcha)[![License](https://camo.githubusercontent.com/4af32d8c2eb47f17aaeee2e787477378d6576418c976bf23d5a6e2f48ff7873b/687474703a2f2f706f7365722e707567782e6f72672f74696e7977616e2f636170746368612f6c6963656e7365)](https://packagist.org/packages/tinywan/captcha)[![PHP Version Require](https://camo.githubusercontent.com/99253bd2ba366e38d0a298a7d6e261e1b5321e86fafaa7023933f4583774da88/687474703a2f2f706f7365722e707567782e6f72672f74696e7977616e2f636170746368612f726571756972652f706870)](https://packagist.org/packages/tinywan/captcha)

base64 image verification captcha library for webman plugin

安装
--

[](#安装)

```
composer require tinywan/captcha
```

使用
--

[](#使用)

### 1、生成base64

[](#1生成base64)

```
var_export(Tinywan\Captcha\Captcha::base64());  // 就这么简单
```

**以上输出base64**

```
array (
  'key' => '$2y$10$QCLukWC.DMmPuMArKEJNaeBaSeBnzFOM3nv8bL4jBJFJBIe.8YngC',
  'base64' => 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAA+BAMAAADwuxusAAAAG1BMVEXz+/5Bd1vc6umauaxtmIODqJiwycBXh2/G2tUJ+xU0AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACo0lEQVRYhe1Xz7OTMBCmSaE5uj76eEfQ6dRjcUbH44tv/HFs1T8AxovHph70WMbq8882hBKSQKXEPrnkO0CSDfl2s5vd4HkODg4ODg4ODg6ngF6NyZ7fjMmePh6TfTMOO6Frwf7IHH//EGxMGIkhO/YRuy5fdGvMsw6EJ38TpoJsBnKgiOJSqdvLsD+lED4/LU5CQTmXAxhuO9mvbcgxlPigD/6OZXMKZXujWEav+APWxjqFDTviln/8BNKt1SBEcjcCWPEnU9y8hD2fsZJ9srJmX8I89rwFzNVBBIo6JTFRyHhny2c06m6Eb5IrC3bKDeG4F85s6H826pQn2xfbXyOdcw0a9qXwgg07hqNDaagLFtKxBV92okmnkJFK6UpVVhJPtN07D0ltw1Td2xIyzmaRGdCI7QJ1M4ryWxt2Wn+DmJE6Z7W5mJtJ9cxWhAEoXQJcudlwdgK7unnY6yK/Xh/BGhnny4fPKjs3Pmu0PR++ud+qKD626DZQvFwNfY3ULuHRMx3OPtNi2RDVrfxmGhnCBHSuHPYW7BOxLN53iHK52mTeOk2Bnh94f+ebGvYjEYvkHUc1AJlb/ShvFfONEWNptLBmh9emAG2aiCDQKimt3ILhbjh7lUV4rs907h8UlBPODLHXkdXTCMw5vagKGNe8CZlnv16842k+jJWV2wu3qrkPw9nxcX9l0sFMFNzoLj75TaVQOxLeDmb3mLAhgLqA5gDf3rz80sPdcbHyyHByLxfXpERmk/t2AHaBtC4XVsDw3TveVgQQFer0IT+dpQYh5Z7HSnH3of+OgugZk84CYVFWqJakp1O/BIT7y7Dza0TEVEsI60/YyqXzX3EA/Va1bKru/8DBCDRq1tOHhfEvgy8VU3YY998cZWOyOzg4ONjjD4tjUV+t8cERAAAAAElFTkSuQmCC',
)
```

> 通过网址： BASE64转图片

**转图片效果如图**

[![captcha.png](captcha.png)](captcha.png)

### 2、验证验证码

[](#2验证验证码)

```
use Tinywan\Captcha\Captcha;
use support\Request;

$code = $request->get('code');
$key = $request->get('key');
if (false === Tinywan\Captcha\Captcha::check($code, $key)) {
	// 验证失败
};
// 验证通过
```

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 94.7% 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 ~45 days

Total

4

Last Release

1415d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0042e0b68ff6a731ef382a03eecd211736c2d619acc55b2b326988085f72bfb?d=identicon)[Tinywan](/maintainers/Tinywan)

---

Top Contributors

[![Tinywan](https://avatars.githubusercontent.com/u/14959876?v=4)](https://github.com/Tinywan "Tinywan (18 commits)")[![ihipop](https://avatars.githubusercontent.com/u/423077?v=4)](https://github.com/ihipop "ihipop (1 commits)")

---

Tags

base64captchaimagephpphp-libraryplugintinywanwebmanwebman-frameworkworkermanpluginbase64captchawebman

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[awcodes/filament-curator

A media picker plugin for FilamentPHP.

436333.6k24](/packages/awcodes-filament-curator)[humanmade/gaussholder

Fast and lightweight image previews for WordPress

196120.0k](/packages/humanmade-gaussholder)[nicolafranchini/venobox

Responsive JavaScript modal window plugin, touch swipe gallery

7117.1k](/packages/nicolafranchini-venobox)[melihovv/base64-image-decoder

A base64 image decoder

46141.1k](/packages/melihovv-base64-image-decoder)[viper007bond/regenerate-thumbnails

Regenerate the thumbnails for one or more of your image uploads. Useful when changing their sizes or your theme.

13912.3k](/packages/viper007bond-regenerate-thumbnails)[webplusm/gallery-json-media

a filament media storing in a Json field

196.7k](/packages/webplusm-gallery-json-media)

PHPackages © 2026

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