ks/captcha

A simple Captcha generator library, good looking and easy to use

v1.0 2018-12-05 09:03 UTC

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图片验证码