Skip to main content
CaptchaKings
  • 首页
  • 特征
  • 定价
  • 演示
    • 它是如何运作的
    • Forum
    • IP旋转器
    • 博客
Search
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
登录 免费注册
  • EN English
  • ID Indonesia
  • RU Русский
  • ES Español
  • PT Português
  • VI Tiếng Việt
  • ZH 中文
登录 免费注册

PHP Captcha Solver

Image captchas in PHP today — reCAPTCHA planned — updated August 2026

TL;DR — AI Quick Answer (PHP Captcha Solver)

CaptchaKings enables fast, zero-dependency captcha solving in PHP via native cURL, GuzzleHttp, and WordPress wp_remote_post.

• Endpoints: https://captchakings.com/api/process.php (Image OCR, ~1.2s median, $0.80/1,000 solves) & specialized endpoints for GeeTest, Tencent, MTCaptcha, Amazon WAF ($1.00/1,000).
• Compatibility: Works on standard shared hosting (cPanel, DirectAdmin) and modern PHP 7.4 / 8.x environments without root access or custom extensions.
• Trial: $0.50 free balance upon registration with instant API key access.

Support status: Live today via the API: image/text captchas ($0.80 per 1,000, ~1.2s median) plus GeeTest, Tencent, xCaptcha, MTCaptcha and Amazon WAF ($1.00 per 1,000) — measured numbers at /benchmarks. reCAPTCHA, hCaptcha and Cloudflare Turnstile are planned, not yet available — see /supported-captchas.

Image Captchas with Native cURL

No Composer, no dependencies — just the cURL extension that ships with PHP. CURLFile handles the multipart upload:

solve_image.php
<?php
$apiKey = getenv('CAPTCHAKINGS_KEY');

$ch = curl_init('https://captchakings.com/api/process.php');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => ["Authorization: Bearer $apiKey"],
    CURLOPT_POSTFIELDS => ['captcha' => new CURLFile('captcha.jpg')],
    CURLOPT_TIMEOUT => 30
]);

$data = json_decode(curl_exec($ch), true);
curl_close($ch);

if ($data['success']) {
    echo $data['data']['prediction'];        // solved text
    echo $data['data']['confidence'];        // 0-100
    echo $data['billing']['balance_remaining'];
} else {
    echo 'Error: ' . $data['error']['message'];
}

reCAPTCHA v2 Token Flow (Planned)

Token captchas will be solved by submitting the page URL and site key, then using the returned token. For reCAPTCHA v2 and hCaptcha this flow is planned, not yet available — the exact endpoint and request format will be announced on the changelog when reCAPTCHA support launches; see /recaptcha-solver. The live solvers today (Amazon AWS WAF, GeeTest, Tencent, xCaptcha, MTCaptcha) answer synchronously in one POST. The image-captcha flow above works today. The outline below is a preview of the planned flow:

recaptcha.php — planned preview
<?php
function solveRecaptchaV2(string $pageUrl, string $siteKey): string {
    // The final reCAPTCHA endpoint and request format will be
    // announced on the CaptchaKings changelog at launch.
    // Planned flow:
    //   1. POST your API key + page URL + site key to the solver endpoint
    //   2. Receive the g-recaptcha-response token in the API response
    //   3. Return the token for injection into the target form
    throw new RuntimeException('reCAPTCHA support is coming soon to CaptchaKings');
}

Guzzle Version (Composer Projects)

If your project already uses Guzzle (Laravel, Symfony, Slim...), the same multipart image-captcha call gets shorter — this works today:

guzzle.php — live
<?php
use GuzzleHttp\Client;

$http = new Client();

$img = json_decode($http->post('https://captchakings.com/api/process.php', [
    'headers' => ['Authorization' => 'Bearer ' . getenv('CAPTCHAKINGS_KEY')],
    'multipart' => [[
        'name' => 'captcha',
        'contents' => fopen('captcha.jpg', 'r')
    ]]
])->getBody(), true);

echo $img['data']['prediction'];

WordPress: wp_remote_post (Planned)

Inside a plugin or theme, use WordPress's HTTP API — it picks the right transport automatically. This example outlines the planned reCAPTCHA flow (preview — the exact endpoint and request format will be announced on the changelog at launch; see /recaptcha-solver):

wordpress.php — planned preview
<?php
function myplugin_solve_recaptcha($page_url, $site_key) {
    $api_key = get_option('captchakings_api_key');

    // The final reCAPTCHA endpoint and request format will be
    // announced on the CaptchaKings changelog at launch.
    // Planned flow:
    //   1. wp_remote_post your API key + page URL + site key
    //      to the solver endpoint
    //   2. Receive the g-recaptcha-response token in the API response
    //   3. Return the token for injection into the target form
    return false; // reCAPTCHA support is coming soon to CaptchaKings
}

Endpoint Recap

Captcha TypeEndpointResult
Image captcha — livecaptchakings.com/api/process.phpSolved text (synchronous)
Amazon AWS WAF, GeeTest, Tencent, xCaptcha, MTCaptcha — livecaptchakings.com/api/amazon.php, geetest.php, tencent.php, xcaptcha.php, mtcaptcha.phpCoordinates / solution (synchronous)
reCAPTCHA / hCaptcha — PlannedAnnounced at launchPreview only, not yet available
2Captcha-compatiblecaptchakings.com/in.php / res.phpDrop-in migration format (xCaptcha only)

Best Practices

  • Shared hosting friendly: only outbound HTTPS is needed — no sockets, no custom ports.
  • Store the key in env or wp_options, never hardcoded in versioned files.
  • Set generous timeouts — image OCR answers in ~1.2s median, but Amazon WAF challenges can take up to 30s; allow at least 30s before retrying.
  • Offload bulk jobs to a cron/queue (WP-Cron, Laravel queue) instead of blocking a web request.
  • Always set CURLOPT_TIMEOUT so a slow network can't hang your PHP worker.

FAQ

Does it work on shared hosting?

Yes. The API only needs outbound HTTPS through the cURL extension, which every shared host enables by default. No Composer, root access, or custom ports required.

How do I solve reCAPTCHA v2 in PHP?

reCAPTCHA support is planned, not yet available via the API — see /supported-captchas and /recaptcha-solver. At launch the flow will be: POST the page URL and site key to the CaptchaKings solver endpoint (exact request format announced on the changelog) and use the returned gRecaptchaResponse token. The image-captcha flow works today.

Can I use it in WordPress?

Yes — wp_remote_post handles the image API's multipart body today, and the same function will handle the solver request once reCAPTCHA support launches (planned — see /supported-captchas). Preview example above.

Guzzle or native cURL?

Both work. Native cURL = zero dependencies and runs everywhere; Guzzle is nicer in Composer-based projects like Laravel. Both styles shown above.

Integration Guides for Other Languages

  • Python Captcha Solver Guide
  • Node.js Captcha Solver Guide
  • cURL / Terminal Guide
  • reCAPTCHA Solver — How It Works
  • Full API Documentation
  • Free Browser Tools (no code)

Start solving from PHP today

$0.50 free balance on signup — test with your own captchas.

Get Your API Key
CaptchaKings

CaptchaKings (Captcha Kings) 是用于现代自动化的 AI 验证码识别 API - 快速、精准且透明

产品服务

  • 特征
  • 腾讯 / 中文验证码 NEW
  • xCaptcha 识别 NEW
  • Google reCAPTCHA NEW
  • API 开发文档
  • 定价
  • 它是如何运作的
  • 支持的验证码
  • 基准测试与精度

开发资源

  • 开发者文档
  • Selenium 指南 NEW
  • Playwright 指南 NEW
  • Puppeteer 指南 NEW
  • 免费工具箱 NEW
  • Chrome 扩展插件 NEW
  • 博客与教程
  • IP 轮换器

对比与常见问题

  • 为什么选择 CaptchaKings?
  • 价格对比
  • vs 2Captcha
  • vs CapSolver
  • vs CapMonster
  • vs Anti-Captcha
  • 面向 AI 智能体

关于公司

  • 关于我们
  • 演示
  • 仪表板
  • 客户支持
  • 隐私政策
  • 退款政策
  • 服务条款
  • SLA 服务保障 99.9%

© 2026 CaptchaKings.com. 版权所有。

🚀 Get Started Free
🎁

Wait! Don't Miss Out

Sign up now and get a $0.50 FREE BALANCE to test our API.

Claim Bonus & Sign Up Free

我们使用 Cookie 来改善您的浏览体验、分析网站流量并优化 API 性能。继续使用我们的网站即表示您同意我们的 Cookie 政策。 隐私政策