Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gladyshev committed Feb 20, 2021
1 parent 337f6fd commit ce97a84
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ print_r($captchaText); // h54g6
/* Advanced example */

$rucaptcha = new Rucaptcha\Client('YOUR_API_KEY', [
'verbose' => true
'verbose' => true,
'httpClient' => new \GuzzleHttp\Client(['base_uri' => 'https://2captcha.com']),
'logger' => new \Monolog\Logger('2Captcha', [new StreamHandler('php://stdout')])
]);

$taskIds = [];
Expand Down Expand Up @@ -91,7 +93,6 @@ Client::setHttpClient(Psr\Http\Client\ClientInterface $client): void;
// PSR-3 logger
Client::setLogger(Psr\Log\LoggerInterface $logger): void;


/* Solving captcha methods */

Client::recognize(string $content, array $extra = []): string;
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
},
"require-dev": {
"phpunit/phpunit": "~5.7",
"squizlabs/php_codesniffer": "^2.3"
"squizlabs/php_codesniffer": "^2.3",
"monolog/monolog": "2.2.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 3 additions & 1 deletion examples/advanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
require '../vendor/autoload.php';

$rucaptcha = new Rucaptcha\Client(getenv('__RUCAPTCHA_KEY__'), [
'verbose' => 1
'verbose' => true,
'httpClient' => new GuzzleHttp\Client(['base_uri' => 'https://2captcha.com']),
'logger' => new Monolog\Logger('2Captcha', [new Monolog\Handler\StreamHandler('php://stdout')])
]);

$taskIds = [];
Expand Down

0 comments on commit ce97a84

Please sign in to comment.