PHPackages                             bestcaptchasolver/bestcaptchasolver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. bestcaptchasolver/bestcaptchasolver

ActiveLibrary[API Development](/categories/api)

bestcaptchasolver/bestcaptchasolver
===================================

bestcaptchasolver is a super easy to use bypass captcha php API wrapper for bestcaptchasolver.com captcha service

v0.0.4(7y ago)92243MITPHPPHP &gt;=5.3.0

Since Oct 22Pushed 3y agoCompare

[ Source](https://github.com/bestcaptchasolver/bestcaptchasolver-php)[ Packagist](https://packagist.org/packages/bestcaptchasolver/bestcaptchasolver)[ Docs](https://github.com/bestcaptchasolver/bestcaptchasolver-php)[ RSS](/packages/bestcaptchasolver-bestcaptchasolver/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

BestCaptchaSolver.com php API wrapper
=====================================

[](#bestcaptchasolvercom-php-api-wrapper)

bestcaptchasolver-php is a super easy to use bypass captcha php API wrapper for bestcaptchasolver.com captcha service

Installation
------------

[](#installation)

```
composer require bestcaptchasolver/bestcaptchasolver

```

or

```
git clone https://github.com/bestcaptchasolver/bestcaptchasolver-php

```

How to use?
-----------

[](#how-to-use)

Simply require the module, set the auth details and start using the captcha service:

```
require('lib/bestcaptchasolver.php');
```

Initialize library with access token

Get token from

```
$bcs = new BestCaptchaSolver($ACCESS_TOKEN);
```

Once you've set your authentication details, you can start using the API

**Get balance**

Returns balance in USD

```
$balance = $bcs->account_balance();
```

**Submit image captcha**

You can give it a b64 encoded string or a file path as `image` parameter

```
$p = array();
$p['image'] = '../captcha.jpg';
// $p['is_case'] = FALSE;         // is case sensitive, default: False
// $p['is_phrase'] = FALSE;       // has at least one space, default: FALSE, optional
// $p['is_math'] = FALSE;         // math captcha calculation, default: FALSE, optional
// $p['alphanumeric'] = 1;        // 1 - digits only, 2 - letters only, default: all, optional
// $p['minlength'] = 2;           // minimum text length, default: any, optional
// $p['maxlength'] = 3;           // maximum text length, default: any, optional
// $p['affiliate_id'] = 'affiliate_id';  // get it from /account, optional

$id = $bcs->submit_image_captcha($p);
```

**Retrieve image text**

Once you have the captcha ID, you can check for completion of captcha

```
$image_text = NULL;
while($image_text === NULL) {
    $image_text = $bcs->retrieve($id)['text'];  // get the image text (if completed)
    sleep(2);                           // retry every 2 seconds
}
```

**Submit recaptcha details**

For recaptcha submission there are two parameters that are required an others that are optional

- page\_url
- site\_key
- type (optional, defaults to 1 if not given)
    - `1` - v2
    - `2` - invisible
    - `3` - v3
    - `4` - enterprise v2
    - `5` - enterprise v3
- v3\_action (optional)
- v3\_min\_score (optional)
- domain (optional)
- data\_s (optional)
- cookie\_input (optional)
- user\_agent (optional)
- proxy (optional)
- affiliate\_id (optional)

Check the [/api](https://bestcaptchasolver.com/api) page for more about this parameters

```
$p = array();
$p['page_url'] = $PAGE_URL;
$p['site_key'] = $SITE_KEY;
$id = $bcs->submit_recaptcha($p);
```

**Retrieve recaptcha gresponse**

Just as the image captcha, once you have the ID, you can start checking for it's completion using the same retrieve method. The response (when ready) will be a gresponse code

```
$gresponse = NULL;
while($gresponse === NULL) {
    $gresponse = $bcs->retrieve($id)['gresponse'];  // get the image text (if completed)
    sleep(2);                           // retry every 2 seconds
}
```

**If submitted with proxy, get proxy status**

```
$proxy_status = $bcs->retrieve($id)['proxy_status']

```

**Geetest**

- domain
- gt
- challenge
- api\_server (optional)
- user\_agent (optional)
- proxy (optional)

```
$p = array();
$p['domain'] = 'DOMAIN_HERE';
$p['gt'] = 'GT_HERE';
$p['challenge'] = 'CHALLENGE_HERE';
//$p['api_server'] = 'GT_DOMAIN_HERE';         // optional
//$p['user_agent'] = 'user agent here';        // optional
//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional
//$p["affiliate_id"] = "affiliate_id";         // optional
$id = $bcs->submit_geetest($p);
$solution = $bcs->retrieve($id)['solution'];  // get the image text (if completed)
```

**GeetestV4**

- domain
- captchaid
- user\_agent (optional)
- proxy (optional)

**Important:** This is not the captchaid that's in our system that you receive while submitting a captcha. Gather this from HTML source of page with geetestv4 captcha, inside the `` tag you'll find a link that looks like this:

```
$p = array();
$p['domain'] = 'https://example.com';
$p['captchaid'] = '647f5ed2ed8acb4be36784e01556bb71';
//$p['user_agent'] = 'user agent here';        // optional
//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional
//$p["affiliate_id"] = "affiliate_id";         // optional
$id = $bcs->submit_geetest_v4($p);
$solution = $bcs->retrieve($id)['solution'];  // get the image text (if completed)
```

**Capy**

- page\_url
- site\_key
- user\_agent (optional)
- proxy (optional)

```
$p = array();
$p['page_url'] = 'PAGE_URL_HERE';
$p['site_key'] = 'SITE_KEY_HERE';
//$p['user_agent'] = 'user agent here';        // optional
//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional
//$p["affiliate_id"] = "affiliate_id";         // optional
$id = $bcs->submit_capy($p);
$solution = $bcs->retrieve($id)['solution'];
```

**hCaptcha**

- page\_url
- site\_key
- invisible (optional)
- payload (optional)
- domain (optional)
- user\_agent (optional)
- proxy (optional)

```
$p = array();
$p['page_url'] = 'PAGE_URL_HERE';
$p['site_key'] = 'SITE_KEY_HERE';
// $p['invisible'] = true;
// $p['payload'] = array(
//     "rqdata" => "taken from web requests"
// );
// $p['domain'] = 'hcaptcha.com';               // optional
// $p['user_agent'] = 'user agent here';        // optional
// $p['proxy'] = '123.234.241.123:1234';        // optional
// $p["affiliate_id"] = "affiliate_id";         // get it from /account

$id = $bcs->submit_hcaptcha($p);
$solution = $bcs->retrieve($id)['solution'];
```

**FunCaptcha (Arkose Labs)**

- page\_url
- s\_url
- site\_key
- data (optional)
- user\_agent (optional)
- proxy (optional)

```
$p = array();
$p['page_url'] = 'https://abc.com';
$p['s_url'] = 'https://api.arkoselabs.com';
$p['site_key'] = '11111111-1111-1111-1111-111111111111';
//$p['data'] = '{"x":"y"}';                    // optional
//$p['user_agent'] = 'user agent here';        // optional
//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional
//$p["affiliate_id"] = "affiliate_id";         // get it from /account
$id = $bcs->submit_funcaptcha($p);
$solution = $bcs->retrieve($id)['solution'];
```

**Turnstile (Cloudflare)**

- page\_url
- site\_key
- action (optional)
- cdata (optional)
- domain (optional)
- user\_agent (optional)
- proxy (optional)

```
$p = array();
$p['page_url'] = 'PAGE_URL_HERE';
$p['site_key'] = 'SITE_KEY_HERE';
// $p['action'] = 'taken from page source, optional';
// $p['cdata'] = 'taken from page source, optional';
// $p['domain'] = 'challenges.cloudflare.com';  // optional
// $p['user_agent'] = 'user agent here';        // optional
// $p['proxy'] = '123.234.241.123:1234';        // optional
// $p["affiliate_id"] = "affiliate_id";         // get it from /account
$id = $bcs->submit_turnstile($p);
$solution = $bcs->retrieve($id)['solution'];
```

**Task**

- template\_name
- page\_url
- variables
- user\_agent (optional)
- proxy (optional)
- affiliate\_id (optional)

```
$p = array();
$p['page_url'] = 'https://bestcaptchasolver.com/automation/login';
$p['template_name'] = 'Login test page';
$p['variables'] = array(
  "username" => "roger", "password" => "mypass"
);
// $p['user_agent'] = 'user agent here';        // optional
// $p['proxy'] = '123.234.241.123:1234';        // optional
// $p["affiliate_id"] = "affiliate_id";         // get it from /account
$id = $bcs->submit_task($p);
```

#### Task pushVariables

[](#task-pushvariables)

Update task variables while it is being solved by the worker. Useful when dealing with data / variables, of which value you don't know, only after a certain step or action of the task. For example, in websites that require 2 factor authentication code.

When the task (while running on workers machine) is getting to an action defined in the template, that requires a variable, but variable was not set with the task submission, it will wait until the variable is updated through push.

The `bcs.task_push_variables(captcha_id, push_variables)` method can be used as many times as it is needed.

```
$bcs->task_push_variables($id, array(
   "tfa_code" => "1693"
));
```

**Set captcha bad**

When a captcha was solved wrong by our workers, you can notify the server with it's ID, so we know something went wrong.

```
$bcs->set_captcha_bad(50);
```

Examples
--------

[](#examples)

Check example.php

License
-------

[](#license)

API library is licensed under the MIT License

More information
----------------

[](#more-information)

More details about the server-side API can be found [here](https://bestcaptchasolver.com/api)

captcha, bypasscaptcha, decaptcher, decaptcha, 2captcha, deathbycaptcha, anticaptcha, bypassrecaptchav2, bypassnocaptcharecaptcha, bypassinvisiblerecaptcha, captchaservicesforrecaptchav2, recaptchav2captchasolver, googlerecaptchasolver, recaptchasolverpython, recaptchabypassscript, bestcaptchasolver

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2807d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/39192403?v=4)[BCS](/maintainers/bestcaptchasolver)[@bestcaptchasolver](https://github.com/bestcaptchasolver)

---

Top Contributors

[![bestcaptchasolver](https://avatars.githubusercontent.com/u/39192403?v=4)](https://github.com/bestcaptchasolver "bestcaptchasolver (17 commits)")[![imagetyperz-api](https://avatars.githubusercontent.com/u/36262483?v=4)](https://github.com/imagetyperz-api "imagetyperz-api (1 commits)")

---

Tags

2captchaanticaptchabestcaptchasolverbypass-invisible-recaptchabypass-no-captcha-recaptchabypass-recaptcha-v2bypasscaptchacaptchacaptcha-services-for-recaptcha-v2deathbycaptchadecaptchadecaptchergoogle-recaptcha-solverphp-captchaphp-recaptcharecaptcha-bypass-scriptrecaptcha-solver-phprecaptcha-v2-captcha-solvercaptchadecaptcha2captchaanticaptchadeathbycaptchadecaptcherbypasscaptchabypass recaptcha v2bypass no captcha recaptchabypass invisible recaptchacaptcha services for recaptcha v2recaptcha v2 captcha solvergoogle recaptcha solverrecaptcha solver pythonrecaptcha bypass scriptbestcaptchasolver

### Embed Badge

![Health badge](/badges/bestcaptchasolver-bestcaptchasolver/health.svg)

```
[![Health](https://phpackages.com/badges/bestcaptchasolver-bestcaptchasolver/health.svg)](https://phpackages.com/packages/bestcaptchasolver-bestcaptchasolver)
```

###  Alternatives

[2captcha/2captcha

PHP package for easy integration with 2captcha API

86470.8k4](/packages/2captcha-2captcha)[jumper423/decaptcha

Распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

65139.5k1](/packages/jumper423-decaptcha)[recaptcha/php5

A properly coded PHP 5 reCaptcha class that will allow you to interact with Google's reCaptcha API.

40704.9k4](/packages/recaptcha-php5)[solvercaptcha/solvecaptcha-php

PHP package for easy integration with solvecaptcha API.

131.4k](/packages/solvercaptcha-solvecaptcha-php)[jumper423/yii2-captcha

Распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

172.6k2](/packages/jumper423-yii2-captcha)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
