2017 © Pedro Peláez
 

library gatekeeper

Prevent spammers from ever reading your site

image

flamecore/gatekeeper

Prevent spammers from ever reading your site

  • Thursday, June 8, 2017
  • by secondtruth
  • Repository
  • 7 Watchers
  • 10 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

FlameCore Gatekeeper

Build Status Scrutinizer Coverage License, (*1)

This library protects websites from spam and other attacks. It prevents bad bots from delivering their junk, and in many cases, from ever reading your site in the first place., (*2)

Description

Welcome to a whole new way of keeping your service, forum, wiki or content management system free of spam and other attacks. Gatekeeper is a PHP-based solution for blocking spam and the robots which deliver it. This keeps your site's load down, makes your site logs cleaner, and can help prevent denial of service conditions caused by spammers., (*3)

Gatekeeper also transcends other anti-spam solutions by working in a completely different, unique way. Instead of merely looking at the content of potential spam, Gatekeeper analyzes the delivery method as well as the software the spammer is using. In this way, Gatekeeper can stop spam attacks even when nobody has ever seen the particular spam before., (*4)

Gatekeeper is designed to work alongside existing spam prevention services to increase their effectiveness and efficiency. Whenever possible, you should run it in combination with a more traditional spam prevention service., (*5)

The library is inspired by the Bad Behavior anti-spam system by Michael Hampton., (*6)

Usage

Include the vendor autoloader and use the classes:, (*7)

namespace Acme\MyApplication;

use FlameCore\Gatekeeper\Screener;
use FlameCore\Gatekeeper\Gatekeeper;
use FlameCore\Gatekeeper\Listing\IPList;
use FlameCore\Gatekeeper\Check\IPBlacklistCheck;
use Symfony\Component\HttpFoundation\Request;

require 'vendor/autoload.php';

Create the Check object(s) you want to use:, (*8)

$blacklist = new IPList(['127.0.0.2', '127.0.0.3/32']);
$check = new IPBlacklistCheck($blacklist);

Create a Screener object and add the checks to it:, (*9)

$screener = new Screener();
$screener->setWhitelist(new IPList('127.0.0.1'));
$screener->addCheck($check);

Create a Gatekeeper object and run it using the screener:, (*10)

$request = Request::createFromGlobals();

$gatekeeper = new Gatekeeper();
$gatekeeper->run($request, $screener);

Installation

Install via Composer

Install Composer if you don't already have it present on your system:, (*11)

$ curl -sS https://getcomposer.org/installer | php

To install the library, run the following command and you will get the latest development version:, (*12)

$ php composer.phar require secondtruth/gatekeeper:dev-master

Requirements

  • You must have at least PHP version 5.6 installed on your system.

Contributors

If you want to contribute, please see the CONTRIBUTING file first., (*13)

Thanks to the contributors:, (*14)

  • Christian Neff (secondtruth)
  • Michael Hampton

The Versions

08/06 2017

dev-master

9999999-dev http://www.flamecore.org

Prevent spammers from ever reading your site

  Sources   Download

ISC

The Requires

 

The Development Requires

security antispam