PHPackages                             sabirov/yii2-anti-captcha-v2 - 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. sabirov/yii2-anti-captcha-v2

ActiveYii2-extension[API Development](/categories/api)

sabirov/yii2-anti-captcha-v2
============================

работа с anti-captcha.com через API v.2

0.0.1(9y ago)15.7kMITPHP

Since Apr 11Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Sabirov/yii2-AntiCaptcha)[ Packagist](https://packagist.org/packages/sabirov/yii2-anti-captcha-v2)[ RSS](/packages/sabirov-yii2-anti-captcha-v2/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Work with anti-captcha.com using API v.2.0
==========================================

[](#work-with-anti-captchacom-using-api-v20)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist sabirov/yii2-anti-captcha-v2 "*"

```

or add

```
"sabirov/yii2-anti-captcha-v2": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

> Refer to the [Official Documentation](https://anticaptcha.atlassian.net/wiki/display/API/API+v.2+Documentation)

### ImageToTextTask : solve usual image captcha

[](#imagetotexttask--solve-usual-image-captcha)

A simple example :

```
use Sabirov\AntiCaptcha\ImageToText;

$anticaptcha = new ImageToText();
$anticaptcha->setVerboseMode(true); // chatty mode ON
$anticaptcha->setKey( 'YourСlientKey' );
$anticaptcha->setFile( '/path/to/image' );

if ( ! $anticaptcha->createTask() ) {
    $anticaptcha->debout( "API v2 send failed - " . $anticaptcha->getErrorMessage(), "red" );

    return false;
}

$taskId = $anticaptcha->getTaskId();

if ( ! $anticaptcha->waitForResult() ) {
	$anticaptcha->debout( "could not solve captcha", "red" );
	$anticaptcha->debout( $anticaptcha->getErrorMessage() );
} else {
	echo "\nhash result: " . $captcha_result . "\n\n";
}
```

Object structure:

PropertySet propertyTypeRequiredDefault valuePurposebodysetFile($fileName)StringYes-in the set function to pass the absolute path to the imagephrasesetPhraseFlag($value)BooleanNofalse**false** - no requirements **true** - worker must enter an answer with at least one "space"casesetCaseFlag($value)BooleanNofalse**false** - no requirements **true** - worker will see a special mark telling that answer must be entered with case sensitivity.numericsetNumericFlag($value)IntegerNo00 - no requirements **1** - only number are allowed **2** - any letters are allowed except numbersmathsetMathFlag($value)BooleanNofalse**false** - no requirements **true** - worker will see a special mark telling that answer must be calculatedminLengthsetMinLengthFlag($value)IntegerNo00 - no requirements **&gt;1** - defines minimum length of the answermaxLengthsetMaxLengthFlag($value)IntegerNo00 - no requirements **&gt;1** - defines maximum length of the answer### NoCaptchaTask : Google Recaptcha puzzle solving

[](#nocaptchatask--google-recaptcha-puzzle-solving)

> Refer to the [Official Documentation](https://anticaptcha.atlassian.net/wiki/display/API/NoCaptchaTask+%3A+Google+Recaptcha+puzzle+solving)

### NoCaptchaTaskProxyless : Google Recaptcha puzzle solving without proxies

[](#nocaptchataskproxyless--google-recaptcha-puzzle-solving-without-proxies)

A simple example :

```
use Sabirov\AntiCaptcha\NoCaptchaProxyless;

$anticaptcha = new NoCaptchaProxyless();
$anticaptcha->setVerboseMode(true); // chatty mode ON
$anticaptcha->setKey( 'YourСlientKey' );
$anticaptcha->setWebsiteURL( 'https://www.instagram.com/' );
$anticaptcha->setWebsiteKey( '6LebnxwUAAAAAGm3yH06pfqQtcMH0AYDwlsXnh-u' );

if ( ! $anticaptcha->createTask() ) {
	$anticaptcha->debout( "API v2 send failed - " . $anticaptcha->getErrorMessage(), "red" );
	return false;
}

$taskId = $anticaptcha->getTaskId();

if ( ! $anticaptcha->waitForResult() ) {
	$anticaptcha->debout( "could not solve captcha", "red" );
	$anticaptcha->debout( $anticaptcha->getErrorMessage() );
	return false;
} else {
	echo "\nhash result: " . $anticaptcha->getTaskSolution() . "\n\n";
}
```

Object structure:

PropertySet propertyTypeRequiredPurposewebsiteURLsetWebsiteURL( $value )StringYesAddress of target web pagewebsiteKeysetWebsiteKey( $value )StringYesRecaptcha website key

websiteSTokensetWebsiteSToken( $value )StringNoSecret token for previous version of Recaptcha (now deprecated). In most cases websites use newer version and this token is not required.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

3324d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1768e9efd92d40bc9f5e21e3ba3c008e9ab28b928c6a906118defe103cbc06c3?d=identicon)[Sabirov](/maintainers/Sabirov)

---

Top Contributors

[![sabirov](https://avatars.githubusercontent.com/u/4890101?v=4)](https://github.com/sabirov "sabirov (8 commits)")

---

Tags

yii2extensionanti-captcha

### Embed Badge

![Health badge](/badges/sabirov-yii2-anti-captcha-v2/health.svg)

```
[![Health](https://phpackages.com/badges/sabirov-yii2-anti-captcha-v2/health.svg)](https://phpackages.com/packages/sabirov-yii2-anti-captcha-v2)
```

###  Alternatives

[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)[conquer/services

Yii2 soap wsdl web services

1632.5k](/packages/conquer-services)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

143.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

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