PHP package for easy integration with 2captcha API

CAPTCHAFORUM

Administrator
1644572618326.png
https://packagist.org/packages/2captcha/2captcha

Installation
This package can be installed via composer or manually

Composer
composer require 2captcha/2captcha

Manual
Copy src directory to your project and then require autoloader (src/autoloader.php) where needed:
Code:
require 'path/to/autoloader.php';

Configuration
TwoCaptcha instance can be created like this:
Code:
$solver = new \TwoCaptcha\TwoCaptcha('YOUR_API_KEY');

Also there are few options that can be configured:
Code:
$solver = new \TwoCaptcha\TwoCaptcha([
    'apiKey'           => 'YOUR_API_KEY',
    'softId'           => 123,
    'callback'         => 'https://your.site/result-receiver',
    'defaultTimeout'   => 120,
    'recaptchaTimeout' => 600,
    'pollingInterval'  => 10,
]);