Home / Random webcam masturbation site / Free porn speedchat

Free porn speedchat personal ads dating service personals relationship

It depends purely on your goals - what you're trying to achieve, the level of support you have and how important it is to remove profanities of different types.

In building a filter, you need to consider the following elements and how they relate to your project: You can easily build a profanity filter that captures 90% of profanities, but you'll never hit 100%. The closer you want to get to 100%, the harder it becomes...

A regex like: and run it on your input string using preg_match() to wholesale test for a hit, or preg_replace() to blank them out.

You can also load those functions up with arrays rather than a single long regex, and for long word lists, it may be more manageable.

The larger challenge is to come up with something that will let people quote "The pen is mightier than the sword" while blocking "p e n i s".

If you can do something like Digg/Stackoverflow where the users can downvote/mark obscene content... Then all you need to do is review the "naughty" users, and block them if they break the rules.

If we don't want pictures of that, then preventing the word as a search term is a good gatekeeper, though admittedly not a foolproof method.

See the preg_replace() for some good examples as to how arrays can be used flexibly.

For additional PHP programming examples, see this page for a somewhat advanced generic class for word filtering that *'s out the center letters from censored words, and this previous Stack Overflow question that also has a PHP example (the main valuable part in there is the SQL-based filtered word approach -- the leet-speak compensator can be dispensed with if you find it unnecessary).

Somehow, I still got the job offer, but I then tracked down a profanity word list (not unlike this one) and wrote a quick script to generate a new dictionary without all of the bad words (without even having to look at the list).

For your particular case, I think comparing the search to real words sounds like the way to go with a word list like that.

206 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*