PHP code example of mohammadv184 / arcaptcha

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

    

mohammadv184 / arcaptcha example snippets


use Mohammadv184\ArCaptcha\ArCaptcha;

$ArCaptcha = new ArCaptcha($siteKey, $secretKey);

 echo $ArCaptcha->getScript() 

if ($ArCaptcha->verify($_POST["arcaptcha-token"])) {
    echo "OK!";
} else {
    echo "FAILED!";
}