dominykasgel/google-safe-browsing
Composer 安装命令:
composer require dominykasgel/google-safe-browsing
包简介
Google Safe Browsing Lookup API v4 for Laravel
README 文档
README
Goole Safe Browsing v4 package for Laravel.
Installation
Run the following from the Terminal:
composer require dominykasgel/google-safe-browsing
Next, add your new provider to the providers array of config/app.php:
'providers' => [
dominykasgel\GoogleSafeBrowsing\GoogleSafeBrowsingServiceProvider::class,
]
Finally, add aliases to the aliases array of config/app.php: 'aliases' => [ 'GoogleSafeBrowsing' => dominykasgel\GoogleSafeBrowsing\Facades\GoogleSafeBrowsingFacade::class ]
Preparation
-
You need to get your API key from Google Safe Browsing API.
-
Publish the config file.
php artisan vendor:publish --force
-
Set your API key in
YOUR-APP/config/google_safe_browsing.php'api_key' => '*************************************'
Usage
GoogleSafeBrowsing::lookup( 'https://www.github.com' );
if ( GoogleSafeBrowsing::isSecure() ) {
echo 'Secure!';
}
More examples
GoogleSafeBrowsing::lookup( 'https://www.github.com' );
if ( GoogleSafeBrowsing::isSecure() ) {
echo 'Secure!';
}
if ( GoogleSafeBrowsing::isSocialEngineering() ) {
echo 'Social Engineering!';
}
if ( GoogleSafeBrowsing::isMalware() ) {
echo 'Malware!';
}
if ( GoogleSafeBrowsing::isUnwanted() ) {
echo 'Unwatend software!';
}
if ( GoogleSafeBrowsing::isHarmfulApplication() ) {
echo 'Harmful application!';
}
License
The package is licensed under the GPL v3 License.
Copyright 2017 Dominykas Gelucevičius
统计信息
- 总下载量: 165
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2017-04-14