gladyshev / anticaptcha-client

anti-captcha.com client library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anticaptcha-client

Powerful and easy anti-captcha.com API wrapper.

Build Status Scrutinizer Code Quality Code Coverage

Install

$ composer require gladyshev/anticaptcha-client

or

"require": {
  ...
  "gladyshev/anticaptcha-client": "^2.0"
  ...
}

Examples

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.

About

anti-captcha.com client library

License:MIT License


Languages

Language:PHP 99.7%Language:Makefile 0.3%