Download the PHP package dominykasgel/google-safe-browsing without Composer
On this page you can find all versions of the php package dominykasgel/google-safe-browsing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dominykasgel/google-safe-browsing
More information about dominykasgel/google-safe-browsing
Files in dominykasgel/google-safe-browsing
Package google-safe-browsing
Short Description Google Safe Browsing Lookup API v4 for Laravel
License GPL-3.0
Informations about the package google-safe-browsing
GoogleSafeBrowsing
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