ks / captcha
A simple Captcha generator library, good looking and easy to use
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:lib
Requires
- php: >=5.3.0
- ext-gd: *
- ext-mbstring: *
This package is auto-updated.
Last update: 2024-09-27 15:50:29 UTC
README
Captcha Preview
Install
composer require ks/captcha
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
php图片验证码