vovarpd/laravel-anticaptcha
最新稳定版本:v0.1.4
Composer 安装命令:
composer require vovarpd/laravel-anticaptcha
包简介
Laravel implementation of anti-captcha.com API
README 文档
README
This Laravel package based on:
https://github.com/AdminAnticaptcha/anticaptcha-php
Installation
Composer
Run the command:
$ composer require vovarpd/laravel-anticaptcha
Or
Add laravel-anticaptcha in your composer.json or create a new composer.json:
{ "require": { "vovarpd/laravel-anticaptcha": "^0.1" } }
Now tell composer to download the library by running the command:
$ php composer.phar install
Composer will generate the autoloader file automatically. So you only have to include this. Typically its located in the vendor dir and its called autoload.php
Then publish config file by running the command:
$ php artisan vendor:publish --tag=anticaptcha
Basic Usage:
Set API key in config/anticaptcha.php or .env file.
<?php return [ 'key'=>env('ANTICAPTCHA_API_KEY','') ];
Dependency Injection example.
use LaravelAnticaptcha\Anticaptcha\Exceptions\AnticaptchaException; use LaravelAnticaptcha\Anticaptcha\NoCaptchaProxyless; public function handle( NoCaptchaProxyless $no_captcha_proxyless ) { $no_captcha_proxyless->setVerboseMode(false); $no_captcha_proxyless->setWebsiteURL( 'https://targetdomain.com' ); $no_captcha_proxyless->setWebsiteKey( 'recaptcha_site_key' ); $no_captcha_proxyless->createTask(); $taskId = $no_captcha_proxyless->getTaskId(); $no_captcha_proxyless->waitForResult(); dump($no_captcha_proxyless->getTaskSolution()); }
统计信息
- 总下载量: 46.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2019-02-25