PHP Classes

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: 5 years ago
Size: 550 bytes
 

Contents

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

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

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

}

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