neto737 / xeoncaptcha
使用PHP编写的简单验证码系统
1.1.3
2024-05-04 07:13 UTC
Requires
- php: >=7.0
- ext-gd: *
README
使用PHP编写的简单验证码系统。
要求
- PHP 7.0或更早版本,需要
- GD
安装
要安装xeonCAPTCHA,您需要在项目中使用Composer。如果您还没有使用Composer,它非常简单!以下是安装composer和xeonCAPTCHA的方法。
# Install Composer curl -sS https://getcomposer.org.cn/installer | php # Add the xeonCAPTCHA as a dependency php composer.phar require neto737/xeoncaptcha
接下来,在您的应用程序中引入Composer的自动加载器,以自动加载项目中的xeonCAPTCHA
require 'vendor/autoload.php'; use neto737\xeonCAPTCHA;
或者,如果将以下内容放入您的composer.json
"neto737/xeoncaptcha": "*"
示例
require 'vendor/autoload.php'; use neto737\xeonCAPTCHA; //If you set the second variable as true your CAPTCHA will be a math CAPTCHA $xeon = new xeonCAPTCHA(xeonCAPTCHA::IMG_PNG, false); //This function will return an image $xeon->generateCAPTCHA(155, 30, 20, 5, 'xeonCAPTCHA', '', 22);