PHP code example of cap_monster / client
1. Go to this page and download the library: Download cap_monster/client 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/ */
cap_monster / client example snippets
use CapMonsterClient\CapMonsterClient;
use CapMonsterClient\CapMonsterConfiguration;
use CapMonsterClient\Dto\Task\NoCaptchaTask;
$configuration = new CapMonsterConfiguration('YOUR_CAPMONSTER_CLIENT_KEY');
$client = new CapMonsterClient($yourPsr18HttpClient, $configuration);
$task = new NoCaptchaTask(
websiteUrl: 'https://example.com/page-with-captcha',
websiteKey: 'site-key-from-the-page'
);
$solution = $client->runTask($task); // blocks, polling getTaskResult until ready or timeout
echo $solution->getGRecaptchaResponse();
$balance = $client->getBalance();