juliocapuano / simple-anti-spam
1.0.0
2021-02-03 19:56 UTC
Requires
- php: >=5.6
- ext-curl: *
- ext-json: *
Requires (Dev)
- phpunit/phpunit: ^8.5
- squizlabs/php_codesniffer: ^3.0
README
this Package is focused in a simple field validation
Actually using the open api from stopforumspam.com
Structure
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/
Install
Via Composer
$ composer require juliocapuano/simple-antispam
Usage
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) }
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email juliocapuano@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.