PHP Classes
elePHPant
Icontem

PHP Not Allowed: Detect and filter unwanted information

Recommend this page to a friend!
  Info   View files Documentation   View files View files (12)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-07-27 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 70 All time: 9,462 This week: 327Up
Version License PHP version Categories
notallowed 1.0.1Custom (specified...7.2PHP 5, Validation
Description Author

This package can detect and filter unwanted information.

It provides several functions that take as parameters data values that can be passed to applications by the users and determines if they contain unwanted information that if accepted by the applications could cause several types of problems.

Currently the package can detect unwanted information like words to be censored, profane words, banned IP addresses, banned bank accounts, email addresses used by spam traps, etc..

  Performance   Level  
Name: Pierre-Henry Soria <contact>
Classes: 19 packages by
Country: United Kingdom United Kingdom
Age: 28
All time rank: 54228 in United Kingdom United Kingdom
Week rank: 26 Up2 in United Kingdom United Kingdom Up
Innovation award
Innovation award
Nominee: 3x

 

Details

? Not Allowed ?

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.

? Server Requirement

PHP 7.2 or higher.

? Installation (with Composer)

composer require ph-7/notallowed

? Usage

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';
}

? Author

Pierre-Henry Soria")

[![@phenrysay][twitter-image]][twitter-url]

[Pierre-Henry Soria][author-url], a highly passionate, zen &amp; cool software engineer ?

? Used By...

[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.

? License

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

  Files folder image Files  
File Role Description
Files folder imagesrc (1 file, 1 directory)
Files folder imagetests (1 file)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imagebanned-data (6 files)
  Plain text file Ban.php Class Class source

  Files folder image Files  /  src  /  banned-data  
File Role Description
  Accessible without login Plain text file bank_accounts.txt Doc. Documentation
  Accessible without login Plain text file BURNER-EMAIL.LICENSE Lic. License text
  Accessible without login Plain text file emails.txt Doc. Documentation
  Accessible without login Plain text file ips.txt Doc. Documentation
  Accessible without login Plain text file usernames.txt Doc. Documentation
  Accessible without login Plain text file words.txt Doc. Documentation

  Files folder image Files  /  tests  
File Role Description
  Plain text file BanTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:70
This week:0
All time:9,462
This week:327Up