Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 82 | All time: 10,080 This week: 660![]() |
Version | License | PHP version | Categories | |||
notallowed 1.0.1 | Custom (specified... | 7.2 | PHP 5, Validation |
Description | Author | |
This package can detect and filter unwanted information. |
|
NotAllowed is a simple lightweight PHP 7.2 library that helps you to censor words, profane words, blacklisted IPs, forbidden user names, banned bank card numbers, etc.
You can add easily new specific keywords (such as IPs, usernames, bank accounts, words, etc) to ban in ~/src/banned-data/*
folder.
PHP 7.2 or higher.
composer require ph-7/notallowed
Simple example of what you can do with it :)
use PH7\NotAllowed\Ban;
if (Ban::isUsername('admin')) {
echo '"admin" is not allowed as username.';
}
if (Ban::isEmail('james@spamhole.com')) {
echo '"@spamhole.com" domain is considered as a email spam host.';
}
if (Ban::isWord('He is an asshole')) {
echo 'Please watch your mouth :-)';
}
if(Ban::isIp('1.170.36.229')) {
echo 'This IP address is blacklisted';
}
[![@phenrysay][twitter-image]][twitter-url]
[Pierre-Henry Soria][author-url], a highly passionate, zen & cool software engineer ?
[pH7Builder][ph7cms-url], a social dating webapp builder. Used here: https://github.com/pH7Software/pH7-Social-Dating-CMS/blob/master/_protected/framework/Security/Ban/Ban.class.php.
Generously distributed under [MIT License][license-url]!
<!-- GitHub's Markdown reference links --> [author-url]: https://pierrehenry.be [ph7cms-url]: https://ph7cms.com [license-url]: https://opensource.org/licenses/MIT [twitter-image]: https://img.shields.io/twitter/url/https/shields.io.svg?style=social [twitter-url]: https://twitter.com/phenrysay
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.