AZcaptcha/WebService-AZCaptcha
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
NAME
WebService::AZCaptcha - API azcaptcha.com
SYNOPSIS
use WebService::AZCaptcha;
my $azc = WebService::AZCaptcha->new(
key => '......', # from https://azcaptcha.com/setting
);
my $b = $azc->getbalance() or die $azc->errstr;
print "Balance: $b\n";
my $res = $azc->decaptcha("$Bin/captcha.png", language => 1) or die $azc->errstr;
print "Got text as " . $res->{text} . "\n";
if (0) {
$azc->reportbad($res->{id}) or die $azc->errstr;
}
DESCRIPTION
WebService::AZCaptcha is for <https://azcaptcha.com/setting>
METHODS
decaptcha
my $res = $azc->decaptcha($filename_or_file_content) or die $azc->errstr;
my $res = $azc->decaptcha(
$filename_or_file_content
phrase => 1,
language => 1, # check https://azcaptcha.com/setting
) or die $azc->errstr;
print "Got text as " . $res->{text} . "\n";
if (0) {
$azc->reportbad($res->{id}) or die $azc->errstr;
}
upload
my $captcha_id = $azc->upload($filename_or_file_content) or die $azc->errstr;
my $captcha_id = $azc->upload(
$filename_or_file_content
phrase => 1,
language => 1, # check https://azcaptcha.com/setting
) or die $azc->errstr;
get
my $text = $azc->get($captcha_id) or die $azc->errstr;
get_multi
my @texts = $azc->get_multi($captcha_id1, $captcha_id2) or die $azc->errstr;
getbalance
my $b = $azc->getbalance() or die $azc->errstr;
print "Balance: $b\n";
reportbad
my $res = $azc->reportbad($captcha_id) or die $azc->errstr;
getstats
my $res = $azc->getstats($date) or die $azc->errstr;
load
my $load = $azc->load();
request
my $res = $azc->request(action => 'getstats', date => $date);
underlaying method to build request
AUTHOR
Fayland Lam <fayland@gmail.com>
COPYRIGHT
Copyright 2014- Fayland Lam
LICENSE
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
SEE ALSO