1. Go to this page and download the library: Download laoshifu/think-captcha library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
laoshifu / think-captcha example snippets
use laoshifu\captcha\facade\Captcha;
// 生成验证码图片
return Captcha::create();
// 生成算术验证码
return Captcha::create('math');
use laoshifu\captcha\facade\Captcha;
// 验证用户输入
if (Captcha::check($code)) {
// 验证成功
}