dominykasgel/google-safe-browsing

Google Safe Browsing Lookup API v4 for Laravel
165 1
Install
composer require dominykasgel/google-safe-browsing
Latest Version:1.0.0
License:GPL-3.0
Last Updated:Sep 5, 2019
Links: GitHub  ·  Packagist
Maintainer: dominykasgel

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

  1. You need to get your API key from Google Safe Browsing API.

  2. Publish the config file.

    php artisan vendor:publish --force

  3. 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

Related Packages

erirk/paypalpayment

laravel-paypalpayment is simple package help you process direct credit card paym...

0
gabrieloliverio/laravel5-generators

Database metadata-based generators for Laravel 5

1
doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

628,058,007 9,707
laravel/framework

The Laravel Framework.

576,155,700 34,907
laravel/tinker

Powerful REPL for the Laravel framework.

485,678,092 7,440