cainiaoer/think-verify

thinkphp captcha api extension

1.0.8 2025-07-16 09:11 UTC

This package is not auto-updated.

Last update: 2025-07-16 15:32:08 UTC


README

thinkphp 验证码类库API版, 基于tp原有验证码类库做了小调整,将依赖从Session调整到Cache,缓存类型默认为文件缓存,如有需要自行调整配置verify.php中的cache缓存类型

安装

composer require cainiaoer/think-verify

使用

// 助手函数,$uid为客户端传过来的验证码唯一标识符
verify($uid)

验证

if(!verify_check($uid,$verify)){
 //验证失败
};