majesko/anti-captcha
Composer 安装命令:
composer require majesko/anti-captcha
包简介
Wrapper for anti-captcha service
README 文档
README
note: for using library you need to be registered in anti-captcha service and have positive balance
#Installation and usage
#install library with composer
php composer.phar require majesko/anti-captcha
Next init Anti-captcha client with api key from anti-captcha
$client = new \AntiCaptcha\Client('enter api key here');
Prepare captcha image in base64 format using helper method from url
$image = $client->image_url_to_base64('http://url-to-captcha-image');
Create new captcha solving task
$task = new \AntiCaptcha\Tasks\ImageToTextTask($image);
Send task to Anti-captcha
$taskResponse = $client->createTask($task);
Check captcha status
$status = $client->getTaskResult($taskResponse->getTaskId());
If captcha was solved (it takes ~30 seconds - depends on settings and difficulty) get solution
$solution = $status->getSolution();
$solution->getText(); // this is solved captcha string
For more information refer to anti-captcha docs: https://anticaptcha.atlassian.net/wiki/display/API/API+v.2+Documentation
统计信息
- 总下载量: 339
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-05-27