🐘 PHP Bad words filtering

Status
Not open for further replies.
You do not have permission to view the full content of this post. Log in or register now.

BOO Censorship!
I hate censorship as much as anyone, but as a web application developer, there are times when a banned-word list is necessary, especially if the application or site is geared towards younger users or corporate environments.

What This Script Does
The script will take a word or phrase and replace the words you put in the $badwords array and replace it with asterisks.

  • Case insensitive
  • Looks for "leetspeak"-style combinations of foreign characters, numbers and symbols
  • Uses regex, so your badword list stays short
  • Uses asterisks as the replacement, but you can specify your own character
  • Add as many bad words as you like
I haven't finished all of the leetspeak filters yet, but I have a good start so far. If you wish to twiddle those to add or remove, they can be found in the censor.function.php file in the master branch, in the $leet_replace array.
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 960
    Views
  • 2
    Participants
Last reply from:
Draft

Trending Topics

Online now

Members online
1,098
Guests online
1,386
Total visitors
2,484

Forum statistics

Threads
2,273,408
Posts
28,949,318
Members
1,235,739
Latest member
Angela012
Back
Top