Download the PHP package pecee/spam-validator without Composer
On this page you can find all versions of the php package pecee/spam-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pecee/spam-validator
More information about pecee/spam-validator
Files in pecee/spam-validator
Package spam-validator
Short Description Extremely simple and lightweight PHP spam validator class to add an small additional layer of security.
License MIT
Homepage http://www.pecee.dk
Informations about the package spam-validator
Pecee Spam Validator class
Small lightweight class for providing an extremely simple layer of spam-security using moinmo.in's list of blacklisted spam words.
Note: this class will not prevent spam 100% and should only be used to add some additional security when validating the contents of your input-fields on your webste.
Installation
Install this module by running the following composer command:
Usage
If no path to a spam-list is defined, the class will try to fetch the latest version from http://master.moinmo.in/BadContent?action=raw.
Please store the list locally to avoid calling moinmo.in on each request.
Methods
setPathToSpamList($path)
Set path to local spam-list.
Example:
setList($list)
Set the contents of the spam-list yourself.
setText($text)
Text you want to validate. We would recomment using the property on the isSpam
method instead.
getText()
Returns validated text.
downloadList()
Refetch the list from the external source.
Credits
moinmo's awesome job at creating a dictionary of spam-words.
The MIT License (MIT)
Copyright (c) 2016 Simon Sessingø / pecee framework
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.