Package Data | |
---|---|
Maintainer Username: | dominykasgel |
Maintainer Contact: | dominykas.gelucevicius@gmail.com (Dominykas Gelucevičius) |
Package Create Date: | 2017-04-14 |
Package Last Update: | 2019-09-05 |
Language: | PHP |
License: | GPL-3.0 |
Last Refreshed: | 2025-02-07 15:06:02 |
Package Statistics | |
---|---|
Total Downloads: | 163 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 2 |
Total Open Issues: | 3 |
Goole Safe Browsing v4 package for Laravel.
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 ]
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' => '*************************************'
GoogleSafeBrowsing::lookup( 'https://www.github.com' );
if ( GoogleSafeBrowsing::isSecure() ) {
echo 'Secure!';
}
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!';
}
The package is licensed under the GPL v3 License.
Copyright 2017 Dominykas Gelucevičius