Class DeathByCaptcha_HttpClient

Description

Death by Captcha HTTP API Client

Located in /deathbycaptcha.php (line 316)

DeathByCaptcha_Client
   |
   --DeathByCaptcha_HttpClient
Class Constant Summary
 BASE_URL = 'http://api.dbcapi.me/api'
Variable Summary
Method Summary
DeathByCaptcha_HttpClient __construct ( $username,  $password)
void close ()
void get_captcha ( $cid)
void get_user ()
void report ( $cid)
void upload ( $captcha)
array|null _call (string $cmd, [array $payload = null])
void _connect ()
Variables
mixed $_conn = null (line 321)
  • access: protected
mixed $_response_parser = null (line 323)
  • access: protected
mixed $_response_type = '' (line 322)
  • access: protected

Inherited Variables

Inherited from DeathByCaptcha_Client

DeathByCaptcha_Client::$is_verbose
DeathByCaptcha_Client::$_userpwd
Methods
Constructor __construct (line 435)
DeathByCaptcha_HttpClient __construct ( $username,  $password)
  • $username
  • $password

Redefinition of:
DeathByCaptcha_Client::__construct()
close (line 455)
void close ()

Redefinition of:
DeathByCaptcha_Client::close()
Closes opened connection (if any), as gracefully as possible
get_captcha (line 512)
void get_captcha ( $cid)
  • $cid

Redefinition of:
DeathByCaptcha_Client::get_captcha()
Returns CAPTCHA details
get_user (line 470)
void get_user ()

Redefinition of:
DeathByCaptcha_Client::get_user()
Returns user details
report (line 525)
void report ( $cid)
  • $cid

Redefinition of:
DeathByCaptcha_Client::report()
Reports an incorrectly solved CAPTCHA
upload (line 484)
void upload ( $captcha)
  • $captcha

Redefinition of:
DeathByCaptcha_Client::upload()
Uploads a CAPTCHA
_call (line 371)

Makes an API call

  • return: API response hash table on success
  • throws: DeathByCaptcha_IOException On network related errors
  • throws: DeathByCaptcha_ServerException On API server errors
  • throws: DeathByCaptcha_AccessDeniedException On failed login attempt
  • throws: DeathByCaptcha_InvalidCaptchaException On invalid CAPTCHAs rejected by the service
  • access: protected
array|null _call (string $cmd, [array $payload = null])
  • string $cmd: API command
  • array $payload: API call payload, essentially HTTP POST fields
_connect (line 329)

Sets up CURL connection

  • access: protected
void _connect ()

Inherited Methods

Inherited From DeathByCaptcha_Client

DeathByCaptcha_Client::__construct()
DeathByCaptcha_Client::close()
DeathByCaptcha_Client::decode()
DeathByCaptcha_Client::get_balance()
DeathByCaptcha_Client::get_captcha()
DeathByCaptcha_Client::get_text()
DeathByCaptcha_Client::get_user()
DeathByCaptcha_Client::parse_json_response()
DeathByCaptcha_Client::parse_plain_response()
DeathByCaptcha_Client::report()
DeathByCaptcha_Client::upload()
DeathByCaptcha_Client::_is_valid_captcha()
DeathByCaptcha_Client::_load_captcha()
Class Constants
BASE_URL = 'http://api.dbcapi.me/api' (line 318)

Inherited Constants

Inherited from DeathByCaptcha_Client

DeathByCaptcha_Client::API_VERSION
DeathByCaptcha_Client::DEFAULT_TIMEOUT
DeathByCaptcha_Client::POLLS_INTERVAL

Documentation generated on Fri, 11 Nov 2011 19:25:41 +0400 by phpDocumentor 1.4.3