{"id":40648924,"url":"https://github.com/greezlu/capsolver-php","last_synced_at":"2026-01-21T08:21:41.187Z","repository":{"id":204197377,"uuid":"711294185","full_name":"greezlu/capsolver-php","owner":"greezlu","description":"Client for CapSolver service.","archived":false,"fork":false,"pushed_at":"2025-05-29T18:49:53.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T19:53:44.243Z","etag":null,"topics":["api","capsolver","captcha","captcha-solver","client","php","recaptcha"],"latest_commit_sha":null,"homepage":"https://capsolver.com","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greezlu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-10-28T19:48:42.000Z","updated_at":"2025-05-29T18:49:37.000Z","dependencies_parsed_at":"2025-08-07T22:45:09.323Z","dependency_job_id":null,"html_url":"https://github.com/greezlu/capsolver-php","commit_stats":null,"previous_names":["greezlu/capsolver-php"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/greezlu/capsolver-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greezlu%2Fcapsolver-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greezlu%2Fcapsolver-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greezlu%2Fcapsolver-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greezlu%2Fcapsolver-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greezlu","download_url":"https://codeload.github.com/greezlu/capsolver-php/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greezlu%2Fcapsolver-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28630121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["api","capsolver","captcha","captcha-solver","client","php","recaptcha"],"created_at":"2026-01-21T08:21:40.458Z","updated_at":"2026-01-21T08:21:41.181Z","avatar_url":"https://github.com/greezlu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP Client for CapSolver API\nThe simple client for [CapSolver](https://capsolver.com) captcha solving service.\n\n- [Installation](#installation)\n    - [Composer](#composer)\n- [Configuration](#configuration)\n- [Solve captcha](#solve-captcha)\n    - [ReCaptcha v3](#recaptcha-v3)\n    - [ReCaptcha v2](#recaptcha-v2)\n    - [Cloudflare Turnstile](#cloudflare-turnstile)\n- [Error handling](#error-handling)\n\n## Installation\nThis package can be installed via composer.\n\n### Composer\n```\ncomposer require greezlu/capsolver-php\n```\n\n## Configuration\n`CapsolverClient` instance can be created like this:\n```php\n$solver = new \\Capsolver\\CapsolverClient('YOUR_API_KEY');\n```\n\n## Solve captcha\nFind more information about request and response in the related documentation page.\n\n### ReCaptcha v3\nMore in the [documentation.](https://docs.capsolver.com/en/guide/captcha/ReCaptchaV3/)\n\nRequest:\n```php\n$solution = $solver-\u003erecaptchaV3(\n    \\Capsolver\\Solvers\\Token\\ReCaptchaV3::TASK,\n    [\n      'websiteURL'    =\u003e 'https://www.google.com/recaptcha/api2/demo',\n      'websiteKey'    =\u003e '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-',\n      'pageAction'    =\u003e 'verify',\n      'minScore'      =\u003e 0.6,\n      'proxy'         =\u003e 'http:ip:port:user:pass'\n    ]\n);\n```\n\nResponse:\n```php\n$solution = [\n    'userAgent' =\u003e 'xxx',\n    'expireTime' =\u003e 1671615324290,\n    'gRecaptchaResponse' =\u003e '3AHJ...'\n];\n```\n\n### ReCaptcha v2\nMore in the [documentation.](https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2/)\n\nRequest:\n```php\n$solution = $solver-\u003erecaptchaV2(\n    \\Capsolver\\Solvers\\Token\\ReCaptchaV2::TASK,\n    [\n      'websiteURL'    =\u003e 'https://www.google.com/recaptcha/api2/demo',\n      'websiteKey'    =\u003e '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-',\n      'proxy'         =\u003e 'http:ip:port:user:pass'\n    ]\n);\n```\n\nResponse:\n```php\n$solution = [\n    'userAgent' =\u003e 'xxx',\n    'expireTime' =\u003e 1671615324290,\n    'gRecaptchaResponse' =\u003e '3AHJ...'\n];\n```\n\n### Cloudflare Turnstile\nMore in the [documentation](https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/).\n\nRequest:\n```php\n$solution = $solver-\u003eturnsite([\n    'websiteURL'    =\u003e 'https://www.yourwebsite.com',\n    'websiteKey'    =\u003e '0x4XXXXXXXXXXXXXXXXX',\n    'metadata'      =\u003e [\n        'action'        =\u003e 'login', //optional\n        'cdata'         =\u003e '0000-1111-2222-3333-example-cdata' //optional\n    ]\n]);\n```\n\nResponse:\n```php\n$result = [\n    'token'     =\u003e \"0.mF74FV8wEuf...\",\n    'type'      =\u003e 'turnstile',\n    'userAgent' =\u003e 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)...'\n];\n```\n\n## Error handling\nIf case of an error solver throws an instance of `CapsolverException` exception.\n\n```php\ntry {\n    $solution = $solver-\u003erecaptchaV3('', []);\n} catch (\\Capsolver\\Exceptions\\RequestException $error) {\n    // Error happened before api request\n} catch (\\Capsolver\\Exceptions\\ResponseException $error) {\n    // Error happened after api request\n} catch (\\Capsolver\\Exceptions\\CapsolverException $error) {\n    // General error\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreezlu%2Fcapsolver-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreezlu%2Fcapsolver-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreezlu%2Fcapsolver-php/lists"}