function ReplaceBadWords($comment)
 {
     $wordlist = "@\$\$,13?,2 girls 1 cup,2g1c,3p,4r5e,5h1t,5hit,a_s_s,a55,aardappels afgieteng,aborto,achter het \n\n\traam \n\n\tzitten,acrotomophilia,afberen,aflebberen,afrossen,afrukken,aftrekken,afwerkplaats,afzeiken,afzui\n\n\tgen,ahole,allumé,allumée,allupato,amador,amcik,ammucchiata,anal,anale,analritter,anderhalve man \n\n\ten een \n\n\tpaardekop,andskota,anilingus,anita,anus,ânus,ar5e,aranha,ariano,arrapato,arrse,arrusa,arruso,ars\n\n\tch,arschficker,arschlecker,arschloch,arse,arsehole,asbak,Asesinato,ash0le,ash0les,asholes,asno,a\n\n\tso,Ass Monkey,assatanato,asses,Assface,assfucker,ass-\n\n\tfucker,assfukka,assh0le,assh0lez,asshole,assholes,assholz,assmunch,assrammer,asswhole,asswipe,au\n\n\tto erotic,autoerotic,ayir,azzhole,b!+ch,b!tch,b00b,b00bs,b17ch,b1tch,babeland,baby \n\n\tbatter,bagascia,bagger schijten,bagnarsi,baiser,balalao,baldracca,balen,ball gag,ball gravy,ball \n\n\tkicking,ball licking,ball sack,ball \n\n\tsucking,ballbag,balle,balls,ballsack,bander,bangbros,bareback,barely \n\n\tlegal,barenaked,bassterds,bastard,bastardo,bastards,bastardz,basterds,basterdz,bastinado,battere\n\n\t,battona,bbw,bdsm,beastial,beastiality,beaver cleaver,beaver \n\n\tlips,bedonderen,befborstelg,beffen,bekken,belazeren,belino,bellend,besodemieterd \n\n\tzijn,besodemieteren,bestial,bestiality,beurt,bi curious,bi+ch,bi7ch,Biatch,bicha,big black,big \n\n\tbreasts,big knockers,big \n\n\ttits,biga,bigornette,bimbos,birdlock,biscate,bissexual,bitch,bitcher,bitchers,bitches,bitchin,bi\n\n\ttching,bite,bitte,black c**k,bloblos,blonde action,blonde on blonde action,bloody,blow j,Blow \n\n\tJob,blow your l,b*****b,blowjobs,blue \n\n\twaffle,blumpkin,bocchinara,bocchino,boceta,boemelen,boerelul,boerenpummelg,boffing,bofilo,boiata\n\n\t,boiolas,bokkelul,Bollera,bollock,bollocks,bollok,bondage,boner,boob,boobs,booobs,boooobs,booooo\n\n\tbs,booooooobs,booty \n\n\tcall,bordel,bordello,bosser,bosta,botergeil,bourré,bourrée,branlage,branler,branlette,branleur,b\n\n\tranleuse,bratze,braulio de borracha,breasts,brinca,broekhoesten,brouter le cresson,brown \n\n\tshowers,brugpieperg,brunette action,bucaiolo,buceta,budiùlo,buffelen,bugger,buiten de pot \n\n\tpiesen,bukkake,bulldyke,bullet vibe,bum,bumbum,bumsen,bung hole,bunghole,bunny f****r,buona \n\n\tdonna,burro,busone,busty,butt,buttcheeks,butthole,buttmuch,butt-\n\n\tpirate,b******g,buttwipe,bychara,byk,c0ck,c0cks,c0cksucker,c0k,cabrao,cabron,Cabrón,Caca,cacca,c\n\n\taccati in mano e prenditi a \n\n\tschiaffi,cacete,caciocappella,cadavere,cagar,cagare,cagata,cagna,cailler,camel \n\n\ttoe,camgirl,camisinha,cammello,camslut,camwhore,cappella,caralho,carciofo,carità,carpet \n\n\tmuncher,carpetmuncher,casci,cawk,cawks,cazzata,cazzimma,cazzo,cerveja,chatte,checca,chernozhopyi\n\n\t,chiappa,chiasse,chiavare,chiavata,chier,chink,chiottes,chochota,chocolate \n\n\trosebuds,chraa,chuj,Chupada,Chupapollas,chupar,Chupetón,ciospo,cipa,circlejerk,cirer,ciucciami \n\n\til cazzo,cl1t,cleveland steamer,c**t,clito,clitoris,clits,clover \n\n\tclamps,clusterfuck,cnts,cntz,cnut,cocaína,c**k,cockface,cockhead,c**k-\n\n\thead,cockmunch,cockmuncher,cocks,cocksuck ,cocksucked ,C********r,c**k-\n\n\tsucker,cocksucking,cocksucks \n\n\t,cocksuka,cocksukka,coglione,coglioni,c*k,cokmuncher,coksucka,colhoes,comer,cona,concha,Conc\n\n\tha de tu \n\n\tmadre,connard,connasse,conne,Coño,consolo,coon,Coprofagía,coprolagnia,coprophilia,cornhole,corno\n\n\t,cornuto,couilles,cox,cozza,cramouille,crap,cu,cul,culattina,culattone,Culo,cum,cummer,cumming,c\n\n\tums,cumshot,cunilingus,cunillingus,cunnilingus,c**t,cuntlick ,cuntlicker ,cuntlicking \n\n\t,cunts,cuntz,cyalis,cyberfuc,cyberfuck ,cyberfucked ,cyberfucker,cyberfuckers,cyberfucking \n\n\t,d1ck,d4mn,damn,dar o rabo,darkie,da's kloten van de bok,date rape,daterape,daygo,de ballen,de \n\n\thoer spelen,de hond uitlaten,de koffer induiken,de pijp aan maarten geven,de pijp \n\n\tuitgaan,déconne,déconner,deep throat,deepthroat,dego,delg,di \n\n\tmerda,dick,dickhead,dike,dild0,dild0s,d***o,dildos,dilld0,dilld0s,dink,dinks,dirsa,dirty \n\n\tpillows,dirty sanchez,ditalino,dlck,dödel,dog style,dog-f****r,doggie \n\n\tstyle,doggiestyle,doggin,dogging,doggy \n\n\tstyle,doggystyle,dolboy'eb,dolcett,dombo,domination,dominatricks,dominatrics,dominatrix,dommes,d\n\n\tonkey punch,donkeyribber,doosh,double dong,double penetration,doudounes,dp \n\n\taction,draaikontg,drague,driehoog achter wonen,Drogas,drolg,drooggeiler,droogkloot,duche,dum \n\n\traio,dupa,duro,dyke,dziwka,eat my ass,ebalnik,ebalo,ebalom sch'elkat,ecchi,een beurt geven,een \n\n\tnummertje maken,een wip maken,eikel,ejackulate,e*******e,ejaculated,ejaculates ,ejaculating \n\n\t,ejaculatings,e*********n,ejakulate,Ekrem,Ekto,emmerdant,emmerder,emmerdeur,emmerdeuse,enculé,en\n\n\tculée,enculer,enema,enfoiré,enfoirée,engerd,erotic,erotism,escort,Esperma,esporra,ethical \n\n\tslut,étron,eunuch,f u c k,f u c k e \n\n\tr,f_u_c_k,f4nny,faen,f*g,fag1t,faget,fagg1t,fagging,faggit,faggitt,f****t,faggs,fagit,fagot,fago\n\n\tts,fags,fagz,faig,faigs,fanculo,fanny,fannyflaps,fannyfucker,fanyy,fare \n\n\tunaŠ,fart,fatass,fava,fcuk,fcuker,fcuking,fecal,feces,feck,fecker,feg,felch,Felcher,f******g,fel\n\n\tlate,f******o,feltch,female squirting,femdom,femminuccia,fica,fick,ficken,Fiesta de \n\n\tsalchichas,figa,figging,figlio di buona donna,figlio di puttana,figone,filho da puta,fille de \n\n\tpute,fils de pute,fingerfuck ,fingerfucked ,fingerfucker ,fingerfuckers,fingerfucking \n\n\t,fingerfucks ,fingering,finocchio,fistfuck,fistfucked ,fistfucker ,fistfuckers ,fistfucking \n\n\t,fistfuckings ,fistfucks ,fisting,fitt,flamoes,flange,flic,flikken,Flikker,flipping the \n\n\tbird,flittchen,foda,foda-se,foder,Follador,Follar,folle,f**k,fooker,foot \n\n\tfetish,footjob,foreskin,fottere,fottersi,Fotze,foutre,fracicone,frango \n\n\tassado,fratze,fregna,frocio,froscio,frotting,Fu(,f**k,f**k \n\n\tbuttons,f***a,f****d,f****r,fuckers,fuckhead,fuckheads,f****n,f*****g,f******s,fuckingshitmother\n\n\tfucker,f****e ,f***s,fuckwhit,f*****t,fudge \n\n\tpacker,f*********r,fuk,Fukah,Fuken,fuker,Fukin,Fukk,Fukkah,Fukken,Fukker,Fukkin,fuks,fukwhit,fuk\n\n\twit,fuori come un balcone,futanari,futkretzn,f*x,fux0r,g ????,g00k,gadverdamme,galbak,gang \n\n\tbang,g******g,gangbanged ,gangbangs ,gat,gay,gay \n\n\tsex,gayboy,gaygirl,gaylord,gays,gaysex,gayz,gedoogzone,geil,geilneef,genitals,gerber,gesodemiete\n\n\tr,giant c**k,Gilipichis,Gilipollas,girl on,girl on top,girls gone wild,goatcx,g****e,God,god-\n\n\tdam,goddamn,goddamned,God-damned,godverdomme,gokkun,gol,golden shower,goldone,goo \n\n\tgirl,goodpoop,gook,goregasm,gouine,gozar,graftak,grande folle,gras \n\n\tmaaien,gratenkutg,grelho,greppeldel,griet,grilletto,grogniasse,grope,group sex,g-\n\n\tspot,guanto,guardone,gueule,guiena,guro,h00r,h0ar,h0r,h0re,h4x0r,Hacer una paja,Haciendo el \n\n\tamor,hackfresse,hand job,handjob,hard core,hardcore,hardcoresex \n\n\t,hell,hells,helvete,hentai,Heroína,heshe,heterosexual,Hija de puta,Hijaputa,Hijo de \n\n\tputa,Hijoputa,hoar,hoare,hoempert,hoer,hoerenbuurt,hoerenloper,hoerig,hol,homem \n\n\tgay,h**o,homoerotic,homoerótico,homosexual,honkey,hooker,hoor,hoore,hore,horniest,horny,hot \n\n\tchick,hotsex,how to kill,how to murder,Huevon,hufter,huge \n\n\tfat,hui,huisdealer,humping,hupen,hure,hurensohn,Idiota,Imbécil,incazzarsi,incest,incoglionirsi,i\n\n\tnferno,infierno,ingoio,injun,intercourse,ische,jack off,jackoff,jack-off ,jail \n\n\tbait,jailbait,jap,japs,jerk off,jerk-off,jerk-off \n\n\t,jigaboo,jiggaboo,jiggerboo,Jilipollas,jisim,jism,jiss,j*z ,jizm,jizm \n\n\t,j**z,johny,jouir,juggs,kackbratze,kacke,kacken,kampflesbe,kanen,kanker,Kapullo,kawk,kettingzeug\n\n\tg,kike,kimme,kinbaku,kinkster,kinky,klaarkomen,klerebeer,klojo,klooien,klootjesvolk,klootoog,klo\n\n\totzak,kloten,knackwurst,knob,knobbing,knobead,knobed,k*****d,knobhead,knobjocky,knobjokey,knobs,\n\n\tknobz,knor,knulle,kock,kondum,kondums,kontg,kontneuken,kraut,krentekakker,kuk,kuksuger,kum,kumme\n\n\tr,kumming,kums,kunilingus,kunt,kunts,kuntz,Kurac,kurwa,kusi,kut,kuttelikkertje,kwakkieg,kyrpa,l3\n\n\ti+ch,l3itch,la putain de ta mère,labia,Lameculos,l'arte bolognese,latte,leather \n\n\trestraint,leather straight jacket,leccaculo,lecchino,lemon \n\n\tparty,Lesbian,lésbica,lesbo,Lezzian,liefdesgrot,Lipshits,Lipshitz,lmfao,lofare,loffa,loffare,lol\n\n\tita,lovemaking,lul,lul-de-\n\n\tbehanger,lulhannes,lumaca,lummel,lümmel,lust,lusting,m0f0,m0fo,m45terbate,ma5terb8,ma5terbate,Ma\n\n\tciza,Macizorra,mafketel,make me come,maldito,male \n\n\tsquirting,MALPT,mama,Mamada,mamhoon,manico,mannaggia,maquereau,Marica,Maricón,maricon,Mariconazo\n\n\t,martillo,m*******t,masokist,massterbait,masstrbait,masstrbate,masterb8,masterbaiter,masterbat,m\n\n\tasterbat3,masterbate,master-\n\n\tbate,masterbates,masterbation,masterbations,masturbat,m********e,matennaaierg,matje,melon,menage \n\n\ta trois,ménage a \n\n\ttrois,merd,merda,merdata,merde,merdeuse,merdeux,merdoso,merlan,meuf,mibun,Mierda,mignotta,milcht\n\n\tüten,milf,minchia,minchione,missionary position,mof,mof0,mofo,mo-\n\n\tfo,mona,monkleigh,monta,montare,möpse,morgenlatte,morue,möse,Motha F****r,Motha Fuker,Motha \n\n\tFukkah,Motha Fukker,mothafuck,m********a,mothafuckas,mothafuckaz,mothafucked \n\n\t,mothafucker,mothafuckers,mothafuckin,mothafucking ,mothafuckings,mothafucks,Mother \n\n\tFucker,Mother Fukah,Mother Fuker,Mother Fukkah,Mother \n\n\tFukker,motherfuck,motherfucked,m**********r,mother-\n\n\tfucker,motherfuckers,motherfuckin,motherfucking,motherfuckings,motherfuckka,motherfucks,moule,mo\n\n\tuliewop,mound of venus,mr hands,mucke,mudack,muff,muff \n\n\tdiver,muffdiving,mufti,muie,mulkku,muschi,mussa,mutha,Mutha F****r,Mutha Fukah,Mutha Fuker,Mutha \n\n\tFukkah,Mutha \n\n\tFukker,muthafecker,muthafuckker,muther,mutherfucker,mutsg,n1gga,n1gger,n1gr,naaien,naakt,nackt,n\n\n\tambla,nastt,nave \n\n\tscuola,nawashi,nazi,nazis,nègre,negro,neonazi,nepesaurio,nerchia,neuken,neukstier,nicht,nig \n\n\tnog,nigg3r,nigg4h,n***a,niggah,n****s,niggaz,nigger,nigger;,niggers \n\n\t,nigur;,niiger;,niigr;,nimphomania,nippel,nipple,nipples,nique ta mère,nob,nob \n\n\tjokey,nobhead,nobjocky,nobjokey,noune,nsfw \n\n\timages,nude,nudity,nudo,numbnuts,nutsack,nympho,nymphomania,octopussy,oetlul,omorashi,onanieren,\n\n\tone cup two girls,one guy one jar,op z'n hondjes,op z'n sodemieter \n\n\tgeven,opgeilen,opizdenet,opkankeren,oprotten,opsodemieteren,opzouten,orafis,orgasim \n\n\t,orgasim;,orgasims ,o****m,o*****s \n\n\t,orgasum,orgy,oriface,orifice,orifiss,Orina,orospu,osto'eblo,ostokhuitel'no,ot'ebis,otmudohat,ot\n\n\tpizdit,otsosi,ouwe \n\n\trukker,ouwehoer,ouwehoeren,p0rn,paal,paardelul,packi,packie,packy,padlo,padulo,paedophile,paki,p\n\n\takie,paky,palen,palle,palloso,palucher,paneleiro,panties,panty,paska,passar um \n\n\tcheque,patacca,patonza,pau,pawn,pecker,pecorina,pédale,pédé,pedik,Pedo,pedobear,pedophile,peeenu\n\n\ts,peeenusss,peenus,pegging,peidar,peinus,pen1s,penas,penis,pênis,penis-\n\n\tbreath,penisfucker,penozeg,penus,penuus,perdet,perse,Pervertido,pesce,péter,petuh,Pezón,phone \n\n\tsex,phonesex,Phuc,Phuck,Phuk,phuked,Phuker,phuking,phukked,Phukker,phukking,phuks,phuq,picheln,p\n\n\ticio,picka,pidar gnoinyj,piece of \n\n\tshit,pierdol,piesen,pigfucker,pijpbekkieg,pijpen,pik,pillu,pimmel,pimpern,pimpis,pincare,Pinche,\n\n\tpinkeln,pinto,pipa,pipe,pipi,pipì,pippone,pirla,Pis,pisciare,piscio,pisello,piss,piss \n\n\tpig,pissed,pissen,pisser,pissers,pisses ,pissflaps,pissin ,pissing,pissoff \n\n\t,pisspig,pistola,pistolotto,piz`dyulina,pizda,pizdato,pizdatyi,piz'det,pizdetc,pizdoi \n\n\tnakryt'sja,pizd'uk,playboy,pleasure chest,pleurislaaier,po khuy,podi \n\n\tku'evo,poeben,poep,poepen,poilu,po'imat' na konchik,po'iti posrat,polac,polack,polak,pole \n\n\tsmoker,poluchit pizdy,pomiciare,pompa,pompino,ponyplay,poof,Poonani,poontsee,poop \n\n\tchute,poopchute,poot,popel,poppen,porca,porca madonna,porca miseria,porca puttana,porco \n\n\tdue,porco zio,p**n,porno,pornography,pornos,porra,portiekslet,pososi moyu \n\n\tkonfetku,pot,potta,potverdorie,pouffiasse,pousse-\n\n\tcrotte,pr0n,pr1c,pr1ck,pr1k,preteen,prick,pricks ,prince albert \n\n\tpiercing,prissat,proebat,promudobl'adsksya \n\n\tpizdopro'ebina,pron,propezdoloch,prosrat,Prostituta,pthc,pube,pubes,publiciteitsgeil,pula,pule,p\n\n\tusse,pussee,pussi,pussies,pussy,pussys ,puta,puta que pariu,puta que te \n\n\tpariu,putain,pute,puto,puttana,puuke,puuker,qahbeh,quaglia,queaf,queca,queef,queer,queers,queerz\n\n\t,queue,qweers,qweerz,qweir,raaskallen,Racista,raghead,raging \n\n\tboner,Ramera,ramoner,rape,raping,rapist,raspeezdeyi,raspizdatyi,rautenberg,raz'yebuy,raz'yoba,re\n\n\tcchione,recktum,rectum,reet,reet trappen, voor \n\n\tzijn,reetridder,regina,remsporeng,retard,reudig,reutelen,reverse \n\n\tcowgirl,rimjaw,rimjob,rimming,rincoglionire,rizzarsi,rompiballe,rosette,rosy palm,rosy palm and \n\n\ther 5 sisters,rothoer,rotzak,ruffiano,rukhond,rukken,rusty trombone,s & m,s \n\n\thit,s&m,s.o.b.,s_h_i_t,sacanagem,saco,Sádico,sadism,s****t,salaud,salope,sbattere,sbattersi,sbor\n\n\tra,sborrata,sborrone,sbrodolata,scank,scat,schabracke,schaffer,schatje,scheiss,scheiße,schijt,sc\n\n\thijten,schlampe,schlong,schmuck,schnackeln,schoft,schuinsmarcheerder,scissoring,scopare,scopata,\n\n\tscorreggiare,screw,screwing,scroat,scrote,scrotum,s'ebat'sya,sega,s***n,serin,service trois \n\n\tpièces,sex,sexo,Sexo oral,sexy,sh!+,Sh!\n\n\tt,sh1t,sh1ter,sh1ts,sh1tter,sh1tz,shag,shagger,shaggin,shagging,shalava,sharmuta,sharmute,shaved \n\n\tbeaver,shaved pussy,shemale,shi\n\n\t+,shibari,shipal,shit,shitdick,s***e,shited,shitey,shitfuck,shitfull,s******d,shiting,shitings,s\n\n\thits,s*****d,shitter,shitters ,s******g,s*******s,Shitty,shitty \n\n\t,Shity,shitz,shiz,shota,shrimping,Shyt,Shyte,Shytty,Shyty,skanck,skank,skankee,skankey,skanks,Sk\n\n\tanky,skribz,skurwysyn,slanteye,slempen,sletg,sletterig,slik mijn \n\n\tzaad,slinguare,slinguata,s**t,s***s,Slutty,slutz,sm,sm??,smandrappata,s****a,smut,snatch,snolg,s\n\n\tnowballing,soccia,socmel,sodomize,sodomy,son-of-a-\n\n\tbitch,Soplagaitas,Soplapollas,sorca,spac,spagnola,sphencter,spic,spierdalaj,splooge,spompinare,s\n\n\tpooge,spread legs,spuiten,spunk,standje,standje-69g,sticchio,stoephoer,stootje,strap \n\n\ton,strapon,strappado,strip club,strontg,stronza,stronzata,stronzo,styervo,style \n\n\tdoggy,suce,suck,sucks,sufferdg,suicide girls,suka,sukin syn,sultry \n\n\twomen,sveltina,sverginare,svodit posrat,svoloch,swastika,swinger,t1tt1e5,t1tties,tainted \n\n\tlove,tante,tapette,tapijtnek,tarzanello,taste my,tea \n\n\tbagging,teefg,teets,teez,temeier,teringlijer,terrone,testa di cazzo,testical,testicle,Tetas \n\n\tgrandes,tette,teuf,threesome,throating,Tía buena,tied up,tight \n\n\twhite,tirare,tirer,tit,titfuck,t**s,titt,tittchen,titten,tittie5,tittiefucker,titties,titty,titt\n\n\tyfuck,tittywank,titwank,toeter,tongue in \n\n\ta,tongzoeng,topa,topless,torneira,tosser,towelhead,trakhat'sya,tranny,transar,Travesti,tribadism\n\n\t,trick,trimandoblydskiy \n\n\tpizdoproyob,tringle,tringler,Trio,triootjeg,trique,troia,trombare,trottoir \n\n\tprostituée,trottoirteef,trou du cul,tub \n\n\tgirl,tubgirl,turd,turlute,tushy,tw4t,twat,twathead,twatty,twink,twinkie,two girls one \n\n\tcup,twunt,twunter,ubl'yudok,uboy,uccello,u'ebitsche,undressing,upskirt,urethra \n\n\tplay,urophilia,utrecht,v pizdu,v14gra,v1gra,va1jina,vacca,vaffanculo,vafl'a,vafli \n\n\tlovit,vag1na,vagiina,v****a,vai tomar no cu,vai-te \n\n\tfoder,vaj1na,vajina,vangare,veado,venire,venus mound,Verga,vergallen,verkloten,verneuken,vete a \n\n\tla mierda,veuve,viagra,viande a pneus,vibrador,vibrator,viespeuk,vingeren,violet blue,violet \n\n\twand,vittu,vleesroos,vögeln,vollpfosten,voor jan lul,voor jan-met-de-korte-\n\n\tachternaam,vorarephilia,voyeur,vullva,vulva,vyperdysh,vzdrochennyi,w00se,w0p,wang,wank,wanker,wa\n\n\tnky,watje,welzijnsmafia,wet dream,wetback,wh00r,wh0re,white \n\n\tpower,whoar,w***e,wichsen,wichser,wijf,willies,willy,wippen,women rapping,wop,wrapping \n\n\tmen,wrinkled starfish,wuftje,xana,xochota,xrated,xx,xxx,yaoi,yeb vas,yed,yellow \n\n\tshowers,yiffy,zaadje,zabourah,za'ebat,zaebis,zakkenwasser,zalupa,zalupat,zasranetc,zassat,zeiken\n\n\t,zeiker,zinne,zio cantante,zlo'ebuchy,zoccola,zoophilia,zuigen,zuiplap";
     // end segment.
     $words = explode(",", $wordlist);
     $comment_to_lower = strtolower($comment);
     $sentence = explode(" ", $comment_to_lower);
     $regular_case_sentence = explode(" ", $comment);
     $insert_sentence_array = array();
     for ($i = 0; $i < count($sentence); $i++) {
         if ($sentence[i] == "ass") {
             array_push($insert_sentence_array, str_ireplace("ass", addStars("ass")));
         } else {
             array_push($insert_sentence_array, $regular_case_sentence[$i]);
         }
     }
     $comment = implode(" ", $insert_sentence_array);
     $comment_to_lower = strtolower($comment);
     foreach ($words as $word) {
         if (strpos($comment_to_lower, $word) !== false) {
             $comment = str_ireplace($word, addStars($word), $comment);
         }
     }
     $comment = str_ireplace("h**lo", "hello", $comment);
     return $comment;
 }
예제 #2
0
function ReplaceBadWords($comment)
{
    $badword = array();
    $replacementword = array();
    $wordlist = "f**k,f*****g,f****d,ass,motherfuck,m**********r,bulshit,bastard,asshole";
    // replace with the list of bad words from attached rar file
    $words = explode(",", $wordlist);
    foreach ($words as $key => $word) {
        $badword[$key] = $word;
        $replacementword[$key] = addStars($word);
        $badword[$key] = "/\\b{$badword[$key]}\\b/i";
    }
    $comment = preg_replace($badword, $replacementword, $comment);
    return $comment;
}
예제 #3
0
function censorString($string)
{
    function isProfane($word)
    {
        $true = "{\"response\": \"true\"}";
        $ci = curl_init("http://www.wdyl.com/profanity?q=" . $word);
        curl_setopt($ci, CURLOPT_RETURNTRANSFER, true);
        $ce = curl_exec($ci);
        return $ce == $true;
    }
    function addStars($word)
    {
        $length = strlen($word);
        return substr($word, 0, 1) . str_repeat("*", $length - 2) . substr($word, $length - 1, 1);
    }
    $result = "";
    $stringarray = explode(" ", $string);
    foreach ($stringarray as $word) {
        if (isProfane($word)) {
            $result = $result . addStars($word) . " ";
        } else {
            $result = $result . $word . " ";
        }
    }
    return $result;
}