Giter VIP home page Giter VIP logo

q11b / decaptcha Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jumper423/decaptcha

0.0 1.0 0.0 671 KB

Package created to standardize all services for solving captcha. Each service has its own features and now You will have to look at the documentation for the specific service to do everything right. The package covers the entire functionality services. If You will be something lacking or suggestions, I'll be glad to hear them. RuCaptcha, 2Captcha, Anti Captcha, Captcha24, Pixodrom, R.I.P. Captcha

License: Apache License 2.0

PHP 100.00%

decaptcha's Introduction

DeCaptcha

Latest Stable Version Total Downloads License

Build Status Dependency Status Scrutinizer Code Quality Build Status Code Climate Issue Count codecov HHVM Status SensioLabsInsight StyleCI

Menu

Description

Package created to standardize all services for solving captcha. Each service has its own features and now You will have to look at the documentation for the specific service to do everything right. The package covers the entire functionality services. If You will be something lacking or suggestions, I'll be glad to hear them.

Features

  • Suitable for all recognition services captcha
  • You can easily add a new service using the existing engine
  • Intuitable fast and straightforward setup
  • Recognition as the path to the file and links
  • ReCaptcha v2 without a browser
  • Full documentation
  • Covered by tests

Services

Recognition captchas for all popular services

Installation

The preferred way to install this extension via composer.

Or you can run

composer require --prefer-dist jumper423/decaptcha "*"

or add

"jumper423/decaptcha": "*"

in file composer.json.

Examples

Initialization Specify the key mandatory and optional parameters. Try the best to fill this promotes more rapid recognition of captcha.

use jumper423\decaptcha\services\RuCaptcha;

$captcha = new RuCaptcha([
    RuCaptcha::ACTION_FIELD_KEY => '94f39af4bb295c40546fba5c932e0d32',
]);

Recognition In the first parameter, pass the link or path to the picture file in the second parameters of the recognition if necessary, override those which were transferred during the initialization.

if ($captcha->recognize('http://site.com/captcha.jpg')) {
    $code = $captcha->getCode();
} else {
    $error = $captcha->getError();
}

Not correctly recognized If You can understand that the answer which did not come true. Be sure to add below written code. It will save You money.

$captcha->notTrue();

Balance

$balance = $captcha->getBalance();

Intercept errors If you wish, You can catch the error, but you need to call setCauseAnError

$captcha->setCauseAnError(true);

try {
    $captcha->recognize('http://site.com/captcha.jpg');
    $code = $captcha->getCode();
} catch (\jumper423\decaptcha\core\DeCaptchaErrors $e) {
    ...
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.