PHP code example of dskripchenko / yandex-smart-captcha

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

    

dskripchenko / yandex-smart-captcha example snippets



return [
    'token' => 'yandex_smart_captcha'
];

use \Dskripchenko\YandexSmartCaptcha\Facades\YandexSmartCaptcha;

$token = '...token value';
$ip = 'ip address or null';
$throwable = true; 
$valid = YandexSmartCaptcha::validate($token, $ip, $throwable);