hmphu / deathbycaptcha
DeathByCaptcha extension
Installs: 52 643
Dependents: 1
Suggesters: 0
Security: 0
Stars: 5
Watchers: 5
Forks: 3
Open Issues: 1
This package is auto-updated.
Last update: 2024-11-05 18:13:44 UTC
README
Unofficial PHP wrapper for DeathByCaptcha API
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist hmphu/deathbycaptcha
or add
"hmphu/deathbycaptcha": "*"
to the require section of your composer.json.
Usage
use hmphu\deathbycaptcha\DeathByCaptchaSocketClient;
use hmphu\deathbycaptcha\DeathByCaptchaClient;
$deathByCaptchaUser = 'Your DBC API Username Here';
$deathByCaptchaPassword = 'Your DBC API Password Here';
$client = new DeathByCaptchaSocketClient($deathByCaptchaUser, $deathByCaptchaPassword);
try {
$balance = $client->get_balance();
if($balance > 0){
/* Put your CAPTCHA file name or opened file handler, and optional solving timeout (in seconds) here: */
$captcha = $client->decode($img, DeathByCaptchaClient::DEFAULT_TIMEOUT * 2);
if ($captcha) {
$text = $captcha['text'];
}
}
} catch (DeathByCaptchaAccessDeniedException $e) {
/* Access to DBC API denied, check your credentials and/or balance */
}
Authors and Contributors
Make with love to DeathByCaptcha service
In 2016, PhuHM (@hmphu), http://hmphu.com
Support or Contact
Having trouble? contact me