PHP code example of vovarpd / laravel-anticaptcha

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

    

vovarpd / laravel-anticaptcha example snippets

 bash
$ php composer.phar install
 bash
$ php artisan vendor:publish --tag=anticaptcha
 php


return [
	'key'=>env('ANTICAPTCHA_API_KEY','')
];
 php
use LaravelAnticaptcha\Anticaptcha\Exceptions\AnticaptchaException;
use LaravelAnticaptcha\Anticaptcha\NoCaptchaProxyless;

public function handle( NoCaptchaProxyless $no_captcha_proxyless ) {
    $no_captcha_proxyless->setVerboseMode(false);
    $no_captcha_proxyless->setWebsiteURL( 'https://targetdomain.com' );
    $no_captcha_proxyless->setWebsiteKey( 'recaptcha_site_key' );
    $no_captcha_proxyless->createTask();
    $taskId = $no_captcha_proxyless->getTaskId();
    $no_captcha_proxyless->waitForResult();
    dump($no_captcha_proxyless->getTaskSolution());
}