NAME

WebService::Antigate::V1 - Recognition of captches using antigate.com service (now anti-captcha.com) through API v1

SYNOPSIS

# you can use it directly
use WebService::Antigate::V1;

my $recognizer = WebService::Antigate::V1->new(key => "...");
$recognizer->upload_and_recognize(...);

# or via base class
use WebService::Antigate;

my $recognizer = WebService::Antigate->new(key => "...", api_version => 1);
$recognizer->upload_and_recognize(...);

DESCRIPTION

This is subclass of WebService::Antigate which implements version 1 of API.

METHODS

This class has all methods described in WebService::Antigate. Specific changes listed below.

$recognizer->try_upload(%options)

Tries to upload captcha to the service. Accepts this options:

KEY            DEFAULT       DESCRIPTION
----------     ----------    ------------
file            undef        path to the file with captcha
content         undef        captcha content
name            undef        represented name of the file with captcha
phrase          0            1 if captcha text has 2-4 words
regsense        0            1 if that captcha text is case sensitive
numeric         0            1 if that captcha text contains only digits, 2 if captcha text has no digits
calc            0            1 if that digits on the captcha should be summed up
min_len         0            minimum length of the captcha text (0..20)
max_len         0            maximum length of the captcha text (0..20), 0 - no limits
is_russian      0            1 - russian text only, 2 - russian or english, 0 - does not matter
soft_id         undef        id of your application to earn money
header_acao     0            1 if server should return "Access-Control-Allow-Origin: *" header

You must specify either `file' option or `content'. Other options are facultative. If you want to upload captcha from variable (`content' option) instead from file, you must specify the name of the file with `name' option. Antigate webservice determines file format by extension, so it is important to specify proper extension in file name. If `file' option used and file name has no extension and `name' was not specified or if `content' option used and `name' was not specified, this module will try to specify proper name by file signature. If file has unknown signature $WebService::Antigate::FNAME will be used as file name. On success captcha id is returned. On failure returns undef and sets errno and errstr.

This list of settings supported by the service may be outdated. But you can specify any other options supported by the service here without any changes of the module.

SEE ALSO

WebService::Antigate, WebService::Antigate::V2

COPYRIGHT

Oleg G <oleg@cpan.org>.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.