PHP code example of notafacil / zf3-coinhive-captcha

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

    

notafacil / zf3-coinhive-captcha example snippets


    return array(
        'modules' => array(
            // ...
            'CoinHiveCaptcha',
        ),
        // ...
    );
    
bash
php composer.phar update

$element = new \Zend\Captcha\Captcha('coinhive-captcha-token');
$element->setCaptcha(new CoinHiveCaptcha\CoinHiveCaptcha(array('secret_key' => 'YOUR_SECRET', 'public_key' => 'YOUR_PUBLIC_KEY', 'hashes' => 512)));
$form->add($element);