PHPackages                             ayi/imgverify - 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. ayi/imgverify

ActiveLibrary

ayi/imgverify
=============

Package description here.

0.0.1(4y ago)07MITPHP

Since Jul 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/yll1024335892/imgverify)[ Packagist](https://packagist.org/packages/ayi/imgverify)[ RSS](/packages/ayi-imgverify/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Usage
-----

[](#usage)

- 引入

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

- 引入

```
use ayi\imgverify\Imgverify;
```

- 实例化

```
//没有参数实例
$obj=Imgverify::getInstance();
//带参数实例
//error_num同一图片的校验次数,默认为2
//valid_time验证码过期的时间(s),默认600s
//error_distance误差距离,单位为px,默认左右4px的容差距离
$config=["error_num"=>'',"valid_time"=>'',"error_distance"=>""];
$obj=Imgverify::getInstance($config);
```

- 背景图片(1920x1080这个比例的,现使用679px*382px且图片避免用白色背景的)和拖动图片(90px*90px)

```
在https://github.com/yll1024335892/imgverify的image中的分支中

```

- 获取图片的数据举例

```
$bg = [$_SERVER['DOCUMENT_ROOT'] . '/images/bg/1.jpg', $_SERVER['DOCUMENT_ROOT'] . '/images/bg/2.jpg', $_SERVER['DOCUMENT_ROOT'] . '/images/bg/3.jpg', $_SERVER['DOCUMENT_ROOT'] . '/images/bg/4.jpg'];
$d = [$_SERVER['DOCUMENT_ROOT'] . "/images/dr/1.png"];
$res1 = $obj->setConfig($bg, $d);
$imgData = $obj->getImg("bgImg"); //背景图片
echo "";
$imgData = $obj->getImg("dragImg"); //拖动的图片
echo "";

```

- 校验

```
$obj->verify(x的距离)

```

License
-------

[](#license)

MIT

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

1764d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/900190a2db44a82902f362229587a9202f0b6f862b3b7e43ab6e4091b8519f18?d=identicon)[yll1024335892](/maintainers/yll1024335892)

---

Top Contributors

[![yll1024335892](https://avatars.githubusercontent.com/u/12092513?v=4)](https://github.com/yll1024335892 "yll1024335892 (7 commits)")

### Embed Badge

![Health badge](/badges/ayi-imgverify/health.svg)

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

PHPackages © 2026

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