下载包
生成
vendor("captcha.TnCode");
$tn = new \TnCode();
$data = $tn->make();
返回:背景图、滑块图、缓存key(存储滑块距离)
验证
vendor("captcha.TnCode");
$tn = new \TnCode();
if($tn->check('缓存key','滑块移动距离')){
echo "ok";
}else{
echo "error";
}
下载包
生成
vendor("captcha.TnCode");
$tn = new \TnCode();
$data = $tn->make();
返回:背景图、滑块图、缓存key(存储滑块距离)
验证
vendor("captcha.TnCode");
$tn = new \TnCode();
if($tn->check('缓存key','滑块移动距离')){
echo "ok";
}else{
echo "error";
}