PHP code example of ew80 / think-captcha

1. Go to this page and download the library: Download ew80/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/ */

    

ew80 / think-captcha example snippets



if ( ! CaptchaApi::check($code,$key)) {
	//验证码错误
}

前端表单提交:code、key


if ( ! CaptchaApi::checkCode($code,$key)) {
	//验证码错误
}

前端表单提交:code、key