ฟังก์ชั่นตัดคำหยาบซึ่งสามารถเพิ่มคำที่ต้องการตัดได้
// ฟังก์ชั่นตัดคำหยาบซึ่งสามารถเพิ่มคำที่ต้องการตัดได้
function Check($temp){
$wordrude = array("ashole","a s h o l e","a.s.h.o.l.e","bitch","b i t c h","b.i.t.c.h","shit","s h i t","s.h.i.t","***","dick","f u c k","d i c k","f.u.c.k","d.i.c.k","มึง","มึ ง","ม ึ ง","ม ึง","มงึ","มึ.ง","มึ_ง","มึ-ง","มึ+ง","กู","***","ค ว ย","ค.ว.ย","คอ วอ ยอ","คอ-วอ-ยอ","ปี้","***","ไอ้***","เฮี้ย","ชาติหมา","ชาดหมา","ช า ด ห ม า","ช.า.ด.ห.ม.า","ช า ติ ห ม า","ช.า.ติ.ห.ม.า","สัดหมา","สัด","***","หี","สันดาน","***","***","ส้นตีน","แตด") ;
$wordchange = ("Censor") ;
for ( $i=0 ; $i
$temp = eregi_replace ($wordrude[$i] ,$wordchange ,$temp);
}
return ( $temp ) ;
}
Cradit : Thaishadow