{"id":36981347,"url":"https://github.com/bestcaptchasolver/bestcaptchasolver-php","last_synced_at":"2026-01-13T22:51:11.170Z","repository":{"id":62493509,"uuid":"133058144","full_name":"bestcaptchasolver/bestcaptchasolver-php","owner":"bestcaptchasolver","description":"bestcaptchasolver-php is a super easy to use bypass captcha php API wrapper for bestcaptchasolver.com captcha service ","archived":false,"fork":false,"pushed_at":"2023-04-26T10:10:08.000Z","size":45,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-14T04:34:31.619Z","etag":null,"topics":["2captcha","anticaptcha","bestcaptchasolver","bypass-invisible-recaptcha","bypass-no-captcha-recaptcha","bypass-recaptcha-v2","bypasscaptcha","captcha","captcha-services-for-recaptcha-v2","deathbycaptcha","decaptcha","decaptcher","google-recaptcha-solver","php-captcha","php-recaptcha","recaptcha-bypass-script","recaptcha-solver-php","recaptcha-v2-captcha-solver"],"latest_commit_sha":null,"homepage":"https://bestcaptchasolver.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bestcaptchasolver.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-11T15:38:51.000Z","updated_at":"2023-09-19T17:38:54.000Z","dependencies_parsed_at":"2022-11-02T11:31:07.902Z","dependency_job_id":null,"html_url":"https://github.com/bestcaptchasolver/bestcaptchasolver-php","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bestcaptchasolver/bestcaptchasolver-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestcaptchasolver%2Fbestcaptchasolver-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestcaptchasolver%2Fbestcaptchasolver-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestcaptchasolver%2Fbestcaptchasolver-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestcaptchasolver%2Fbestcaptchasolver-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bestcaptchasolver","download_url":"https://codeload.github.com/bestcaptchasolver/bestcaptchasolver-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestcaptchasolver%2Fbestcaptchasolver-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28402171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2captcha","anticaptcha","bestcaptchasolver","bypass-invisible-recaptcha","bypass-no-captcha-recaptcha","bypass-recaptcha-v2","bypasscaptcha","captcha","captcha-services-for-recaptcha-v2","deathbycaptcha","decaptcha","decaptcher","google-recaptcha-solver","php-captcha","php-recaptcha","recaptcha-bypass-script","recaptcha-solver-php","recaptcha-v2-captcha-solver"],"created_at":"2026-01-13T22:51:11.059Z","updated_at":"2026-01-13T22:51:11.149Z","avatar_url":"https://github.com/bestcaptchasolver.png","language":"PHP","readme":"BestCaptchaSolver.com php API wrapper\n=========================================\n\nbestcaptchasolver-php is a super easy to use bypass captcha php API wrapper for bestcaptchasolver.com captcha service\n\n## Installation\n\n    composer require bestcaptchasolver/bestcaptchasolver\n\nor\n    \n    git clone https://github.com/bestcaptchasolver/bestcaptchasolver-php\n\n## How to use?\n\nSimply require the module, set the auth details and start using the captcha service:\n\n``` php\nrequire('lib/bestcaptchasolver.php'); \n```\n\nInitialize library with access token\n\nGet token from [https://bestcaptchasolver.com/account](https://bestcaptchasolver.com/account)\n``` php\n$bcs = new BestCaptchaSolver($ACCESS_TOKEN);   \n```\n\nOnce you've set your authentication details, you can start using the API\n\n**Get balance**\n\nReturns balance in USD\n``` php\n$balance = $bcs-\u003eaccount_balance();\n```\n\n**Submit image captcha**\n\nYou can give it a b64 encoded string or a file path as `image` parameter\n\n``` php\n$p = array();\n$p['image'] = '../captcha.jpg';\n// $p['is_case'] = FALSE;         // is case sensitive, default: False\n// $p['is_phrase'] = FALSE;       // has at least one space, default: FALSE, optional\n// $p['is_math'] = FALSE;         // math captcha calculation, default: FALSE, optional\n// $p['alphanumeric'] = 1;        // 1 - digits only, 2 - letters only, default: all, optional\n// $p['minlength'] = 2;           // minimum text length, default: any, optional\n// $p['maxlength'] = 3;           // maximum text length, default: any, optional\n// $p['affiliate_id'] = 'affiliate_id';  // get it from /account, optional\n\n$id = $bcs-\u003esubmit_image_captcha($p);\n```\n\n**Retrieve image text**\n\nOnce you have the captcha ID, you can check for completion of captcha\n```php\n$image_text = NULL;\nwhile($image_text === NULL) {\n    $image_text = $bcs-\u003eretrieve($id)['text'];  // get the image text (if completed)\n    sleep(2);                           // retry every 2 seconds\n}\n```\n\n**Submit recaptcha details**\n\nFor recaptcha submission there are two parameters that are required an others that are optional\n- page_url\n- site_key\n- type (optional, defaults to 1 if not given)\n    - `1` - v2\n    - `2` - invisible\n    - `3` - v3\n    - `4` - enterprise v2\n    - `5` - enterprise v3\n- v3_action (optional)\n- v3_min_score (optional)\n- domain (optional)\n- data_s (optional)\n- cookie_input (optional)\n- user_agent (optional)\n- proxy (optional)\n- affiliate_id (optional)\n\nCheck the [/api](https://bestcaptchasolver.com/api) page for more about this parameters\n\n``` php\n$p = array();\n$p['page_url'] = $PAGE_URL;\n$p['site_key'] = $SITE_KEY;\n$id = $bcs-\u003esubmit_recaptcha($p);\n```\n\n**Retrieve recaptcha gresponse**\n\nJust as the image captcha, once you have the ID, you can start checking for it's\ncompletion using the same retrieve method. The response (when ready) will be a gresponse code\n\n```php\n$gresponse = NULL;\nwhile($gresponse === NULL) {\n    $gresponse = $bcs-\u003eretrieve($id)['gresponse'];  // get the image text (if completed)\n    sleep(2);                           // retry every 2 seconds\n}\n```\n\n**If submitted with proxy, get proxy status**\n```\n$proxy_status = $bcs-\u003eretrieve($id)['proxy_status']\n```\n\n**Geetest**\n- domain\n- gt\n- challenge\n- api_server (optional)\n- user_agent (optional)\n- proxy (optional)\n\n```php\n$p = array();\n$p['domain'] = 'DOMAIN_HERE';\n$p['gt'] = 'GT_HERE';\n$p['challenge'] = 'CHALLENGE_HERE';\n//$p['api_server'] = 'GT_DOMAIN_HERE';         // optional\n//$p['user_agent'] = 'user agent here';        // optional\n//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional\n//$p[\"affiliate_id\"] = \"affiliate_id\";         // optional\n$id = $bcs-\u003esubmit_geetest($p);\n$solution = $bcs-\u003eretrieve($id)['solution'];  // get the image text (if completed)\n```\n\n\n**GeetestV4**\n- domain\n- captchaid\n- user_agent (optional)\n- proxy (optional)\n\n**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 `\u003cscript\u003e` tag you'll find a link that looks like this: https://i.imgur.com/XcZd47y.png\n\n```php\n$p = array();\n$p['domain'] = 'https://example.com';\n$p['captchaid'] = '647f5ed2ed8acb4be36784e01556bb71';\n//$p['user_agent'] = 'user agent here';        // optional\n//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional\n//$p[\"affiliate_id\"] = \"affiliate_id\";         // optional\n$id = $bcs-\u003esubmit_geetest_v4($p);\n$solution = $bcs-\u003eretrieve($id)['solution'];  // get the image text (if completed)\n```\n\n**Capy**\n- page_url\n- site_key\n- user_agent (optional)\n- proxy (optional)\n\n```php\n$p = array();\n$p['page_url'] = 'PAGE_URL_HERE';\n$p['site_key'] = 'SITE_KEY_HERE';\n//$p['user_agent'] = 'user agent here';        // optional\n//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional\n//$p[\"affiliate_id\"] = \"affiliate_id\";         // optional\n$id = $bcs-\u003esubmit_capy($p);\n$solution = $bcs-\u003eretrieve($id)['solution'];\n```\n\n**hCaptcha**\n- page_url\n- site_key\n- invisible (optional)\n- payload (optional)\n- domain (optional)\n- user_agent (optional)\n- proxy (optional)\n\n```php\n$p = array();\n$p['page_url'] = 'PAGE_URL_HERE';\n$p['site_key'] = 'SITE_KEY_HERE';\n// $p['invisible'] = true;\n// $p['payload'] = array(\n//     \"rqdata\" =\u003e \"taken from web requests\"\n// );\n// $p['domain'] = 'hcaptcha.com';               // optional\n// $p['user_agent'] = 'user agent here';        // optional\n// $p['proxy'] = '123.234.241.123:1234';        // optional\n// $p[\"affiliate_id\"] = \"affiliate_id\";         // get it from /account\n\n$id = $bcs-\u003esubmit_hcaptcha($p);\n$solution = $bcs-\u003eretrieve($id)['solution'];\n```\n\n**FunCaptcha (Arkose Labs)**\n- page_url\n- s_url\n- site_key\n- data (optional)\n- user_agent (optional)\n- proxy (optional)\n\n```php\n$p = array();\n$p['page_url'] = 'https://abc.com';\n$p['s_url'] = 'https://api.arkoselabs.com';\n$p['site_key'] = '11111111-1111-1111-1111-111111111111';\n//$p['data'] = '{\"x\":\"y\"}';                    // optional\n//$p['user_agent'] = 'user agent here';        // optional\n//$p['proxy'] = 'user:pass@123.45.67.89:3031'; // optional\n//$p[\"affiliate_id\"] = \"affiliate_id\";         // get it from /account\n$id = $bcs-\u003esubmit_funcaptcha($p);\n$solution = $bcs-\u003eretrieve($id)['solution'];\n```\n\n**Turnstile (Cloudflare)**\n- page_url\n- site_key\n- action (optional)\n- cdata (optional)\n- domain (optional)\n- user_agent (optional)\n- proxy (optional)\n\n```php\n$p = array();\n$p['page_url'] = 'PAGE_URL_HERE';\n$p['site_key'] = 'SITE_KEY_HERE';\n// $p['action'] = 'taken from page source, optional';\n// $p['cdata'] = 'taken from page source, optional';\n// $p['domain'] = 'challenges.cloudflare.com';  // optional\n// $p['user_agent'] = 'user agent here';        // optional\n// $p['proxy'] = '123.234.241.123:1234';        // optional\n// $p[\"affiliate_id\"] = \"affiliate_id\";         // get it from /account\n$id = $bcs-\u003esubmit_turnstile($p);\n$solution = $bcs-\u003eretrieve($id)['solution'];\n```\n\n**Task**\n- template_name\n- page_url\n- variables\n- user_agent (optional)\n- proxy (optional)\n- affiliate_id (optional)\n\n```php\n$p = array();\n$p['page_url'] = 'https://bestcaptchasolver.com/automation/login';\n$p['template_name'] = 'Login test page';\n$p['variables'] = array(\n  \"username\" =\u003e \"roger\", \"password\" =\u003e \"mypass\"\n);\n// $p['user_agent'] = 'user agent here';        // optional\n// $p['proxy'] = '123.234.241.123:1234';        // optional\n// $p[\"affiliate_id\"] = \"affiliate_id\";         // get it from /account\n$id = $bcs-\u003esubmit_task($p);\n```\n\n#### Task pushVariables\nUpdate task variables while it is being solved by the worker. Useful when dealing with data / variables, of which\nvalue you don't know, only after a certain step or action of the task. For example, in websites that require 2 factor\nauthentication code.\n\nWhen the task (while running on workers machine) is getting to an action defined in the template, that requires a variable, but variable was not\nset with the task submission, it will wait until the variable is updated through push.\n\nThe `bcs.task_push_variables(captcha_id, push_variables)` method can be used as many times as it is needed.\n\n```python\n$bcs-\u003etask_push_variables($id, array(\n   \"tfa_code\" =\u003e \"1693\"\n));\n```\n\n**Set captcha bad**\n\nWhen a captcha was solved wrong by our workers, you can notify the server with it's ID,\nso we know something went wrong.\n\n``` php\n$bcs-\u003eset_captcha_bad(50); \n```\n\n## Examples\nCheck example.php\n\n## License\nAPI library is licensed under the MIT License\n\n## More information\nMore details about the server-side API can be found [here](https://bestcaptchasolver.com/api)\n\n\n\u003csup\u003e\u003csub\u003ecaptcha, bypasscaptcha, decaptcher, decaptcha, 2captcha, deathbycaptcha, anticaptcha, \nbypassrecaptchav2, bypassnocaptcharecaptcha, bypassinvisiblerecaptcha, captchaservicesforrecaptchav2, \nrecaptchav2captchasolver, googlerecaptchasolver, recaptchasolverpython, recaptchabypassscript, bestcaptchasolver\u003c/sup\u003e\u003c/sub\u003e\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestcaptchasolver%2Fbestcaptchasolver-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbestcaptchasolver%2Fbestcaptchasolver-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestcaptchasolver%2Fbestcaptchasolver-php/lists"}