PHP code example of riskivy / yii2-rest-api-captcha

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

    

riskivy / yii2-rest-api-captcha example snippets


(new CaptchaHelper())->generateImage();

(new CaptchaHelper())->verify(\Yii::$app->request->post('code'));