PHP code example of gladyshev / yii2-rucaptcha
1. Go to this page and download the library: Download gladyshev/yii2-rucaptcha 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/ */
gladyshev / yii2-rucaptcha example snippets
...
'components' => [
...
'rucaptcha' => [
'class' => 'gladyshev\yii\rucaptcha\Rucaptcha',
'apiKey' => getenv('__RUCAPTCHA_KEY__'),
'options' => [
'verbose' => (YII_DEBUG === true)
]
],
...
],
...
$captchaText = Yii::$app->rucaptcha->recognizeFile('http://example.com/image.jpg');