Jump to content

Bad Langauage filter


Steppio

Recommended Posts

I've been building a website lately that will have alot of comments from users coming across and was just wondering if anybody has ever heard of a bad/undesirable language filter/template that i could read up on and possibly manipulate into my own webpage. If you've ever heard of anything like this i would be more than grateful if you could help me out. Thanks in advance.

 

Steppio.

Link to comment
Share on other sites

check out php.net/preg_replace

 

<?php
   $badWords = array("/poo/","/fart/","/stinkyhead/","/etc/");
   
   $string = "here is my poo text string of stinkyhead words";
   
   $string = preg_replace($badWords,'bleep',$string);   

echo $string; // returns: here is my bleep text string of bleep words 
?>

Link to comment
Share on other sites

aebstract - if you look at my original message you'll see i didn't ask for any code, i asked if anyone had seen or had any information that could help me. I tried searching for 'PHP Bad Language filter'/'PHP Undesirable Language Filter' which both came up with nothing. I asked for help and phpSensei gave it to me, you gave me sarcasm and a bad attitude. If you feel the need to insult peoples intelligence everytime they ask for help, maybe help forums aren't for you. Thanks to everybody else

Link to comment
Share on other sites

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.