2017 © Pedro Peláez
 

library safebrowser

Client for the Google Safe Browser API

image

xsist10/safebrowser

Client for the Google Safe Browser API

  • Monday, April 7, 2014
  • by xsist10
  • Repository
  • 2 Watchers
  • 3 Stars
  • 47 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Google SafeBrowsing Client

Demo code for PHPSA14 (http://phpsouthafrica.com/) conference, (*1)

Build Status Latest Stable Version Total Downloads License, (*2)

Get an API key

Installing

This library is available via Composer:, (*3)

{
    "require": {
        "xsist10/safebrowser": "v1.0.0"
    }
}

Using

<?php
require 'vendor/autoload.php';

use xsist10\SafeBrowsing\SafeBrowsing;
use xsist10\SafeBrowsing\Strategy\Chain;
use xsist10\SafeBrowsing\Strategy\Post;
use xsist10\SafeBrowsing\Strategy\Get;

$chain = new Chain();
$chain->append(new Post());
$chain->append(new Get());

$safeBrowsing = new SafeBrowsing("[API KEY]", $chain);
$response = $safeBrowsing->isUrlSafe('http://ianfette.org/');
if (!$response->isSecure()) {
    // Oh no! Panic!

    if ($response->hasMalware()) {
        // Malware detected
    }

    if ($response->hasPhishing()) {
        // Phising detected
    }
}

The Versions

07/04 2014

dev-master

9999999-dev

Client for the Google Safe Browser API

  Sources   Download

MIT

The Development Requires

07/04 2014
31/03 2014

v1.0.0

1.0.0.0

Client for the Google Safe Browser API

  Sources   Download

MIT

The Requires

 

The Development Requires