Current location: Hot Scripts Forums » General Community » Script Requests » Word Filter in PHP


Word Filter in PHP

Reply
  #1 (permalink)  
Old 10-31-05, 07:44 PM
seanknighton seanknighton is offline
Newbie Coder
 
Join Date: Nov 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Question Word Filter in PHP

I'm trying to write a profanity word filtering script. The below function works, but it will remove acceptable words. For example, if I filter the word "dog" it will edit the word doggy to "***gy". I'm trying to figure out/find a script that can be very specific. I would like a script that I can tell it exactly were a word can be filter. For example, it could filter using * expressions, like: *dog*, or *dog, or dog* and it would filter accordingly. I hope I making sense. Does anybody have any ideas or know of a script that does this effectively?????

THANKS,
Sean

$find = array("BadWord1","BadWord2","BadWord3");
$replace = array("****","*****","*****");
$field=str_replace($find, $replace, $field);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 profitable script sites for sale cms-master.com General Advertisements 3 07-03-07 11:17 AM
PHP Downside--Solutions? Amulet PHP 10 07-15-05 09:26 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-25-05 12:09 AM
PHP / Graphic Developers someotherguy582 Job Offers & Assistance 1 06-05-05 08:40 PM
word formatting to html via php buzzby PHP 4 05-08-05 09:08 PM


All times are GMT -5. The time now is 01:11 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.