fixed/tp-captcha

兼容tp6以上,前后端分离图片验证码

Installs: 17

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/fixed/tp-captcha

v1.0 2021-12-10 02:05 UTC

This package is auto-updated.

Last update: 2025-09-10 10:19:01 UTC


README

thinkphp6 验证码类库

安装

composer require fixed/tp-captcha

使用

 $captcha = new Captcha();
  $captcha->create();

验证

 $captcha = new Captcha();
$uniqid = 'cbf196301a389c284552f4379a4a159b';
$code = 'vdmn';
if ($captcha->check($uniqid, $code) === true) {
    echo 1;
} else {
    echo 0;
}