A functin (bad words)

In Progress Posted Aug 30, 2014 Paid on delivery
In Progress

### IMPORTANT READ ##

before accept read that project,

1) I will explain everything in here , if you dont understand you can ask.

2) if you ask to me too many questions, I will cancel the project.

3) if you cant finish in time, I will cancel the project

function sanitize_core($text) {

global $bannedWords;

$text = htmlspecialchars($text, ENT_NOQUOTES);

$text = str_replace("\n\r","\n",$text);

$text = str_replace("\r\n","\n",$text);

$text = str_replace("\n"," <br> ",$text);

for ($i=0;$i < count($bannedWords);$i++) {

$text = str_ireplace(' '.$bannedWords[$i].' ',' '.$bannedWords[$i][0].str_repeat("*",strlen($bannedWords[$i])-1).' ',' '.$text.' ');

}

$text = trim($text);

return $text;

}

$bannedWords = array( 'bannedword','bannedword2' );

1) request is

if in system, if you use bannedword or banned2 word t he system making like this b******

I wanna from you,

if I add *face* keyword like this, that thing automaticly ******

for example , if you are lbocking facebook keyword in my system, if you write like facebook!, bannedword system doesnt work!

I wanna from you in my messsage any word like *face* , it will make ****.

2) request, if I add only one word banned for example lets ban '1' number, my system shows me ! because the system works like, if you use badwords fuck

its making f***, thats why, so cancel it please. first word also should be *

PHP

Project ID: #6390415

About the project

1 proposal Remote project Active Aug 30, 2014

Awarded to:

dynamiteboy

Hi I'm a PHP / MySQL developer expert 10 years experience I can ensure that your function hides the keywords you have selected with ****, I am available for nows to do the work.

$5 USD / hour
(8 Reviews)
3.4