PHP Classes

PHP Anti-CAPTCHA: Decode form values with CAPTCHA with anti-CAPTCHA

Recommend this page to a friend!
  Info   View files Example   View files View files (11)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 411 This week: 1All time: 6,476 This week: 560Up
Version License PHP version Categories
anticaptcha-php 1.0.0The PHP License5PHP 5, Web services, Validation
Description 

Author

This package can decode form values with CAPTCHA images using the anti-CAPTCHA API.

It can take an image and send HTTP request to the Anti-CAPTCHA Web service API, so it can return the text that may be in an image decoded by a human solver of that service.

The package also supports using the Anti-CAPTCHA to workaround submitting forms using Google Recaptcha.

Innovation Award
PHP Programming Innovation award winner
June 2017
Winner


Prize: One big elePHPant Plush Mascott
Anti-CAPTCHA is a service that allows providing solutions for CAPTCHA challenges that appear on Web pages to verify if the user accessing the current page is really human.

This package can use the Anti-CAPTCHA service by solve CAPTCHA challenges of many types.

Manuel Lemos
Picture of Roman Kozin
  Performance   Level  
Name: Roman Kozin is available for providing paid consulting. Contact Roman Kozin .
Classes: 7 packages by
Country: Ukraine Ukraine
Age: 28
All time rank: 274648 in Ukraine Ukraine
Week rank: 416 Up8 in Ukraine Ukraine Up
Innovation award
Innovation award
Nominee: 3x

Winner: 2x

Example

<?php
namespace AntiCaptcha;

$api = new ImageToText();
$api->setVerboseMode(true);
       
//your anti-captcha.com account key
$api->setKey("12345678901234567890123456789012");

//setting file
$api->setFile("./capcha.jpg");

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

$taskId = $api->getTaskId();


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


Details

How to install this package?

You can install this package via composer:

composer require kield-01/anticaptcha-composer

Important Notes

For now, this package is on testing

Example

<?php
namespace AntiCaptcha;
use AntiCaptcha\ImageToText;

        $_img_to_text = new ImageToText();
        $_img_to_text->setKey('anticaptcha_key');
        $_img_to_text->setFile(WWW_ROOT . 'capcha.jpg');
        $_task = 0;
        $_result = 0;

        while (!$_img_to_text->createTask()) {
            $_img_to_text->createTask();
        }

        $_task = $_img_to_text->getTaskId();

        while (!$_img_to_text->waitForResult()) {
            $_img_to_text->waitForResult();
        }

        $_result = $_img_to_text->getTaskSolution();

        dump("TaskID : {$_task} : {$_result}");

  Files folder image Files  
File Role Description
Files folder imagesrc (5 files, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Example script

  Files folder image Files  /  src  
File Role Description
Files folder imageexamples (4 files)
  Plain text file AntiCaptcha.php Class Class source
  Plain text file AntiCaptchaTaskProtocolInterface.php Class Class source
  Plain text file ImageToText.php Class Class source
  Plain text file NoCaptcha.php Class Class source
  Plain text file NoCaptchaProxyLess.php Class Class source

  Files folder image Files  /  src  /  examples  
File Role Description
  Accessible without login Image file capcha.jpg Icon Icon image
  Accessible without login Plain text file exampleImageToText.php Example Example script
  Accessible without login Plain text file exampleNoCaptcha.php Example Example script
  Accessible without login Plain text file exampleNoCaptchaProxyless.php Example Example script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:411
This week:1
All time:6,476
This week:560Up