PDA

View Full Version : word filter on a cgi email form


baatkar121
03-17-2006, 02:58 AM
How can i set up a word filter on a html email form?

I have been using emailforms for sometime now without much problem. The script allows the contents typed to be sent to an email and I have further set it up such that all emails to that id get automatically published on my community blog site.

Now a few people are using words which arent entirely decent and I was wondering if there is a way such words are replaced with **** or something similar before being published to the blog.

Further, few of the valued contributors email directly, (not with the emailform on the website) using their favorite email programmes to the blogging email id. Will it be possible for any script to intervene prior to the emailblog being published to the html file and replace the bad words with **** or the like?


I know this is challenging and am convinced that the second is not possible, but pray for someone to prove me wrong.

Thank you for all your help.

mlseim
03-17-2006, 04:18 AM
Try this "flush" foul-language filter:

http://www.iconinteractive.com/freeware/PERL/Flush/

It's a rather old script (circa 1998), but it might have
some possibilities. It looks like you create a text file with
all the bad words and then call the script's various subroutines.

The fun part will be typing a text file with all the bad words ;-)