PHP code example of itjackjw / hcaptcha
1. Go to this page and download the library: Download itjackjw/hcaptcha 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/ */
itjackjw / hcaptcha example snippets
php bin/hyperf.php vendor:publish itjackjw/hcaptcha
# 创建图片验证码
$data = \itjackjw\Haptcha\captcha_create();
$key = $data['key']; # 验证码标识
$key = $data['img']; # 验证码图片
# 验证图片验证码
# $code: 用户输入的验证码
# $key: 创建验证码的时候返回的key
\Ella123\Haptcha\captcha_verify($code,$key);