PHPackages                             ks/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. [Security](/categories/security)
4. /
5. ks/captcha

ActiveLib[Security](/categories/security)

ks/captcha
==========

A simple Captcha generator library, good looking and easy to use

v1.0(7y ago)010MITPHPPHP &gt;=5.3.0

Since Dec 5Pushed 7y ago1 watchersCompare

[ Source](https://github.com/liqingbao/phpcatpcha)[ Packagist](https://packagist.org/packages/ks/captcha)[ Docs](https://github.com/liqingbao/phpcatpcha.git)[ RSS](/packages/ks-captcha/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

phpcatpcha
==========

[](#phpcatpcha)

Captcha Preview
---------------

[](#captcha-preview)

[![](./img/demo1.png)](./img/demo1.png) [![](./img/demo2.png)](./img/demo2.png) [![](./img/demo3.png)](./img/demo3.png) [![](./img/demo4.png)](./img/demo4.png)

Install
-------

[](#install)

```
composer require ks/captcha

```

Usage
-----

[](#usage)

```
require './vendor/autoload.php';

use Ks\Captcha;
$Captcha = new Captcha();

//输出图片 output image
$Captcha->outPut();
//获取图片验证码
$code = $Captcha->getCaptcha();

//可以自定义
$config = [
	'length' => 5,//默认 4
	'width' => 150,//宽度 默认150
	'height' => 50,//高度 默认50
	'fontSize' => 28,//字体大小 默认25
];
$Captcha = new Captcha($config);
$Captcha->outPut();

```

About
-----

[](#about)

php图片验证码

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

2718d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/714e8c833dff6b57e0ee637dc6caa3f92b09c292ee592c50e4bb21a9d64d16a9?d=identicon)[liqingbao](/maintainers/liqingbao)

---

Top Contributors

[![liqingbao](https://avatars.githubusercontent.com/u/18652713?v=4)](https://github.com/liqingbao "liqingbao (12 commits)")

---

Tags

securitycaptchaimage captcha

### Embed Badge

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

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

###  Alternatives

[gregwar/captcha-bundle

Captcha bundle

3524.7M32](/packages/gregwar-captcha-bundle)[s1syphos/php-simple-captcha

Simple captcha generator

2737.8k6](/packages/s1syphos-php-simple-captcha)[lorddashme/php-simple-captcha

A simple captcha package that fit to any type of web application built on php.

102.9k](/packages/lorddashme-php-simple-captcha)

PHPackages © 2026

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