PHP 클래스 Cml\Vendor\VerifyCode

파일 보기 프로젝트 열기: linhecheng/cmlphp

공개 메소드들

메소드 설명
CnVerify ( integer $length = 4, string $type = 'png', integer $width = 180, integer $height = 50, string $font = 'tahoma.ttf', string $verifyName = 'verifyCode' ) : void 中文验证码
calocVerify ( string $type = 'png', integer $width = 170, integer $height = 45, string $font = 'tahoma.ttf', string $verifyName = 'verifyCode' ) : void 生成数字计算题验证码
checkCode ( string $input, boolean $isCn = false, string $verifyName = 'verifyCode' ) : boolean 校验验证码
numVerify ( integer $length = 4, string $type = 'png', integer $width = 150, integer $height = 35, string $verifyName = 'verifyCode', string $font = 'tahoma.ttf' ) : void 生成图像数字验证码
output ( resource &$image, string $type = 'png', string $filename = null, integer $quality = 100 ) : void 输出图片

메소드 상세

CnVerify() 공개 정적인 메소드

中文验证码
public static CnVerify ( integer $length = 4, string $type = 'png', integer $width = 180, integer $height = 50, string $font = 'tahoma.ttf', string $verifyName = 'verifyCode' ) : void
$length integer
$type string
$width integer
$height integer
$font string
$verifyName string
리턴 void

calocVerify() 공개 정적인 메소드

生成数字计算题验证码
public static calocVerify ( string $type = 'png', integer $width = 170, integer $height = 45, string $font = 'tahoma.ttf', string $verifyName = 'verifyCode' ) : void
$type string
$width integer
$height integer
$font string
$verifyName string
리턴 void

checkCode() 공개 정적인 메소드

校验验证码
public static checkCode ( string $input, boolean $isCn = false, string $verifyName = 'verifyCode' ) : boolean
$input string 用户输入
$isCn boolean 是否为中文验证码
$verifyName string 生成验证码时的字段
리턴 boolean 正确返回true,错误返回false

numVerify() 공개 정적인 메소드

生成图像数字验证码
public static numVerify ( integer $length = 4, string $type = 'png', integer $width = 150, integer $height = 35, string $verifyName = 'verifyCode', string $font = 'tahoma.ttf' ) : void
$length integer 位数
$type string 图像格式
$width integer 宽度
$height integer 高度
$verifyName string Cookie中保存的名称
$font string 字体名
리턴 void

output() 공개 정적인 메소드

输出图片
public static output ( resource &$image, string $type = 'png', string $filename = null, integer $quality = 100 ) : void
$image resource 被载入的图片
$type string 输出的类型
$filename string 保存的文件名
$quality integer jpeg保存的质量
리턴 void