PHP script for words censoring
This is a simple PHP class file for words censoring, which can be used for censoring words from user entered text. It'll replace the censoring words by asterix sign(*).

Ex: foo will get replace by ***.

This class file has one class function & one callback function.


The class function 'word_filter()' has 2 parameters & both are compulsory.

filter_words : This parameter can be an array or a single word. So, if there are a list of words need to be censore then all the words can be put in an array & send to the class function else if there is only one single word need to be censore then, one single word can also be send.

string_to_filter : This parameter will hold all user entered text.

Download files :

17th Jun 2012 at 10:37 AM   2275 Views

Oop's, No Comments has been droped for this thread yet now.
Why don't you drop one.