2017 © Pedro Peláez
 

project decaptcha-bundle

Symfony Decaptcha bundle, распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

image

omasn/decaptcha-bundle

Symfony Decaptcha bundle, распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

  • Saturday, September 23, 2017
  • by Fuck4ik
  • Repository
  • 1 Watchers
  • 2 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 22 % Grown

The README.md

DecaptchaBundle

Symfony Decaptcha bundle., (*1)

The package is created for standardization of all services on guessing Captcha. Each service has its own characteristics and now you do not need to operate a few packages. It is enough only to familiarize with the available documentation in order to customize each. The package covers all the functionality of the services. If you do not have enough functionality, I'll be happy to hear all the suggestions. Bundle is implemented on the basis of https://github.com/jumper423/decaptcha, (*2)

Choose Language

Services

Captcha Recognition for all popular services, (*3)

Installation

Get the bundle

Let Composer download and install the bundle by running, (*4)

Or you can run, (*5)

composer require omasn/decaptcha-bundle "*"

or add, (*6)

"omasn/decaptcha-bundle": "1.1.*"

in file composer.json., (*7)

Enable the bundle

// in app/AppKernel.php
public function registerBundles() {
    $bundles = [
        ...
        new Omasn\DecaptchaBundle\DecaptchaBundle(),
    ];
    ...
}

Configuration bundle

Configure api_key for those Captcha Recognition services that you want to use., (*8)

# app/config/config.yml
omasn_decaptcha:
    ru_captcha:
        api_key: '%api_key%'
    anticaptcha:
        api_key: '%api_key%'
    captcha_24:
        api_key: '%api_key%'
    pixodrom:
        api_key: '%api_key%'
    ripcaptcha:
        api_key: '%api_key%'
    socialink:
        api_key: '%api_key%'
    two_captcha:
        api_key: '%api_key%'

Usage

A small example of how on the basis of the RuCaptcha service to get your current balance in the system and by the available url to recognize the captcha. For more information on usage, see Documentation, (*9)

Example in the controller action

// src/AppBundle/Controller/DefaultController.php
...
public function indexAction()
{
    $oReCapcha = $this->get('decaptcha.ru_captcha');
    $iBalance = $oReCapcha->getBalance();
    ...
    if ($oReCapcha->recognize('http://site.ru/captcha.jpg')) {
        $code = $oReCapcha->getCode();
        if (!$myApp->validCode($code)) {
            $oReCapcha->notTrue(); // not valid code request in api
        }
    } else {
        $error = $oReCapcha->getError();
    }
}
...

Using an additional configuration

Add additional parameters to the RuCaptcha configuration "Description of fields", (*10)

// src/AppBundle/Controller/DefaultController.php

use Omasn\DecaptchaBundle\Services\RuCaptcha;

...
public function indexAction()
{
    $oReCapcha = $this->get('decaptcha.ru_captcha');
    $oReCapcha->setParams([
        RuCaptcha::ACTION_FIELD_FILE => '/file/to/path',
    ]);
}
...

The Versions

23/09 2017

dev-master

9999999-dev http://bong.run/

Symfony Decaptcha bundle, распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Omasn Hawk

bundle symfony captcha recognition decaptcha anti-captcha rucaptcha rucaptcha.com 2captcha.com pixodrom.com captcha24.com socialink.ru 2captcha pixodrom captcha24 socialink anti-captcha.com

23/09 2017

1.1.2

1.1.2.0 http://bong.run/

Symfony Decaptcha bundle, распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Omasn Hawk

bundle symfony captcha recognition decaptcha anti-captcha rucaptcha rucaptcha.com 2captcha.com pixodrom.com captcha24.com socialink.ru 2captcha pixodrom captcha24 socialink anti-captcha.com

22/09 2017

1.0.0

1.0.0.0 http://bong.run/

Symfony Decaptcha bundle, распознавание капч для всех популярных сервисов rucaptcha.com, 2captcha.com, pixodrom.com, captcha24.com, socialink.ru, anti-captcha.com

  Sources   Download

MIT

The Requires

 

The Development Requires

by Omasn Hawk

bundle symfony captcha recognition decaptcha anti-captcha rucaptcha rucaptcha.com 2captcha.com pixodrom.com captcha24.com socialink.ru 2captcha pixodrom captcha24 socialink anti-captcha.com