dev-master
9999999-dev https://github.com/enflow-nl/component-spam-filterSimple PHP spam filter which checks input against a blacklist
GPL-3.0
The Requires
The Development Requires
by Andreas Renberg
filter spam blacklist enflow
Simple PHP spam filter which checks input against a blacklist
The enflow/component-spam-filter
package provides a easy way to check if a given text matches any of the blacklists., (*2)
Component is based on IQAndreas/php-spam-filter
., (*3)
You can install the package via composer:, (*4)
``` bash composer require enflow/component-spam-filter, (*5)
## Usage ``` php use Enflow\Component\SpamFilter\SpamFilter; $spamFilter = new SpamFilter(); $spamFilter->isPossibleSpam('fun gambling'); // true $spamFilter->isPossibleSpam('keyword or full text without blacklisted words'); // false
To use a custom blacklist, specify your path in the constructor like where the *.txt files reside: ``` php use Enflow\Component\SpamFilter\SpamFilter;, (*6)
$spamFilter = new SpamFilter('path/to/blacklist');, (*7)
## Blacklist updates Pull Requests for blacklist changes are always welcome! You can find the blacklist files on https://github.com/enflow-nl/spam-filter-blacklists Changes on this list are automatically pulled in with every `composer update`, as this package includes the `master` version of the spam-filter-blacklists package. ## Testing ``` bash $ composer test
Please see CONTRIBUTING for details., (*8)
If you discover any security related issues, please email michel@enflow.nl instead of using the issue tracker., (*9)
The original package from Andreas Renberg has been modified and cleanup, most notable changes: - Added support for a PSR-4 autoloader - Added tests - Removed the blacklist self updater, (*10)
Enflow is a digital creative agency based in Alphen aan den Rijn, Netherlands. We specialize in developing web applications, mobile applications and websites. You can find more info on our website., (*11)
The GNU General Public License v3.0 (GPL-3.0). Please see License File for more information., (*12)
Simple PHP spam filter which checks input against a blacklist
GPL-3.0
filter spam blacklist enflow