nycrite/captcha
Composer 安装命令:
composer create-project nycrite/captcha
包简介
An easy to use CAPTCHA generator for your verification needs.
README 文档
README
The better way to make image CAPTCHAs.
Why?
As a last resort, I created my own CAPTCHA generator after not wanting to use Google's reCAPTCHA. Certainly, Google's CAPTCHAs are more reliable, but I wanted to make my own alternative for certain cases.
Usage
First, initalize the CAPTCHA generator as so:
$captcha = new Nycrite\Captcha\Captcha(); $image = $captcha->image();
Optionally, if you are using the CAPTCHA creator for forms (you most likely are), you can save it to a session.
$_SESSION['phrase'] = $captcha->phrase;
Next, output the image by encoding it in base64.
echo "<img src='data:image/png;base64," . base64_encode($image) . "' alt='captcha'>";
统计信息
- 总下载量: 1
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-12-30