this Package is focused in a simple field validation
Actually using the open api from stopforumspam.com
If any of the following are applicable to your project, then the directory structure should follow industry best practices by being named the following.
bin/
config/
src/
tests/
vendor/
Via Composer
$ composer require juliocapuano/simple-antispam
use juliocapuano\SimpleAntiSpam;
try{
if(SimpleAntiSpam::isSpamEmail($email))
throw new \Exception('email is invalid or in black list')
if(SimpleAntiSpam::isSpamIp([$ip]))
throw new \Exception('ip is invalid or in black list')
if(SimpleAntiSpam::isUrlInText($content))
throw new \Exception('is span text')
// sendEmailOrSomeElse();
} catch (Exception $e){
// manageError($e)
}
Please see CHANGELOG for more information on what has changed recently.
$ composer test
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
If you discover any security related issues, please email juliocapuano@gmail.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.