AZcaptcha for PHP

PSR-4 library for PHP 7.4+, no runtime dependencies beyond cURL.

composer require azcaptcha/azcaptcha-php

Quickstart

PHP
use Azcaptcha\Client;

$client = new Client('YOUR_API_KEY');
$token = $client->solveRecaptchaV2(
    '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-',
    'https://example.com/login'
);
echo $token;
At a glance
Package
azcaptcha/azcaptcha-php
Version
1.0.0
Contract
spec-v1.0.0
License
MIT
  • PHP 7.4 – 8.5
  • Typed exceptions
  • Injectable transport

Three captcha types, three snippets

PHP
$token = $client->solveRecaptchaV2($sitekey, $pageurl);
// invisible / enterprise
$token = $client->solveRecaptchaV2($sitekey, $pageurl, true, true);
PHP
$token = $client->solveTurnstile('0x4AAAAAAA...', 'https://example.com/');
$token = $client->solveHCaptcha('SITEKEY', 'https://example.com/');
PHP
// file path, base64, data: URI or raw bytes
$answer = $client->solveImage('captcha.png');

All snippets assume YOUR_API_KEY is set and a client named client exists. Polling timeouts and retry behaviour are handled by the SDK.