Powerful and easy anti-captcha.com API wrapper.
$ composer require gladyshev/anticaptcha-client
or
"require": {
...
"gladyshev/anticaptcha-client": "^2.0"
...
}
More examples in examples folder.
$configuration = new \Anticaptcha\Configuration(
getenv('__ANTICAPTCHA_KEY__')
);
// PSR-18 HTTP-client
$httpClient = new \GuzzleHttp\Client();
$client = new \Anticaptcha\Client(
$configuration,
$httpClient
);
$result = $client->resolveImage(__DIR__.'/data/captcha.png');
var_dump($result->solution);
/*
array(2) {
["text"]=>
string(14) "замочка"
["url"]=>
string(43) "http://69.39.235.18/510/164683106482493.gif"
}
*/
The library strictly follows the API documentation, so full features can be found by looking at the official documentation of the service.