PHP Content Filter
Wed, 03/03/2010 - 10:18 | gurayc
This function filters any restricted words from your posted content.
function word_filter($txt){ $restricted_words = "test falan filan"; $restricted_words = preg_replace('/[\r\n]+/', '|', $restricted_words); return preg_replace("/($restricted_words)/i", '[*]', $txt); } // call the function: $content = word_filter($content);
5
Average: 5 (1 vote)
Recent comments
-
12 weeks 4 days ago
-
13 weeks 6 days ago
-
26 weeks 4 days ago
-
26 weeks 4 days ago
-
26 weeks 5 days ago


It is very usefull man thanks
Submitted by bbayer on Wed, 03/03/2010 - 11:58.It is very usefull man thanks :)