Jump to content

Recommended Posts

I am currently designing a Flash PHP MYSQL Chatroom which will allow users to have a chatroom on their website but hosted from mine.

The early beta version is availerble on my website for viewing.

I would like to add a content filter option to the client that stops users from submitting certain words so i need a way of removing or detecting certain words from a variable.

Once i do this i will be able to cycle through an array of words which are stored in a mysql database.

All this is done but just can't seem to find the command to find the words withing the variable.
Link to comment
https://forums.phpfreaks.com/topic/11845-remove-swear-words-from-variable/
Share on other sites

[!--quoteo(post=383161:date=Jun 13 2006, 10:08 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 13 2006, 10:08 AM) [snapback]383161[/snapback][/div][div class=\'quotemain\'][!--quotec--]
[code]
foreach ($unallowed as $badword)
{
preg_replace ("/$badword/", "", $text);
}
[/code]
[/quote]

Thankyou i have searched for ages to find somthing to do that but i hate using forums when i have the manual sat on my desktop.

Cheers joquius. [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.