File: example.php

Recommend this page to a friend!
  Classes of Tadiwanashe Huey Mataruse  >  PHP Profanity Filter  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Profanity Filter
Remove profanity words from a given text sentence
Author: By
Last change:
Date: 1 year ago
Size: 550 bytes



Class file image Download
require "Profanus.php";
$clean = new Profanus();

if (isset(
$_POST['btnSubmit'])) {

$sentence = $_POST['string_pass'];
// $censored = $clean->censor_first_word($sentence);
$censored = $clean->censor($sentence);


<!DOCTYPE html>
<html lang="en" dir="ltr">
    <meta charset="utf-8">
    <form class="" action="#" method="post">
        <input type="text" name="string_pass">
        <input type="submit" name="btnSubmit" value="Check">

For more information send a message to info at phpclasses dot org.