Live example: Profanity Checker Sample Link
User-Friendly form based example: Profanity checker user friendly link
=================Check profanity in a given string. Will return a json object, a plain text object, or a boolean if a string contains profanity within the profanity list in the ProfanityChecker class.
____________yourwebsite.com/profanitychecker.php?json=Some text badword
json results:
{"output":"some text _____"}
If profanity is found it will replace the word with "_____" as a default. This can be changed adding an additional variable to the link.
yourwebsite.com/profanitychecker.php?json=Some text badword&options=
This will replace the default characters with "".
json results:
{"output":"some text ***"}
yourwebsite.com/profanitychecker.php?plain=Some text badword
plain text result:
some text ______
With optional character replacement.
yourwebsite.com/profanitychecker.php?plain=Some text badword&options=***
plain text with options result:
some text ***
yourwebsite.com/profanitychecker.php?check=Some text badword
check json results:
{"hasProfanity":true}
- Fix method to add punctuation once stripped in a string
- Update profanity list
- Possibly create database file of profanity list
- Remove profanity list from ProfanityChecker class