PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Mike Block   Profanity Filter   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Test Example of Script
Class: Profanity Filter
Determine if a text contains many obscene words
Author: By
Last change:
Date: 14 years ago
Size: 307 bytes
 

Contents

Class file image Download
<?php
// set some text to scan
$userText = "This is a shitty way to screw with assholes";

require_once(
"profanity_filter.php");

$ft = new profanityFilter();

$contentRating = $ft->scanText($userText);

if (
$contentRating < 5) {
    echo
"Clean enough...";
} else {
    echo
"No way!";
}
exit;
?>