English 中文(简体)
聚苯胺(PHP) 过滤器[复制]
原标题:Implementation of PHP profanity filter [duplicate]
  • 时间:2010-09-13 18:14:04
  •  标签:
  • php
  • iphone
This question already has answers here:
Closed 12 years ago.

Possible Duplicate:
How do you implement a good profanity filter?

我有一台“黄色”仪,通过“URL”向我的“php”书写,然后在我的数据库上加插。 我愿写一下某些《任择议定书》的法典,该法典为任何预先界定的狂热行为都提供了一笔钱。

现在,我只有以下法典,但只看着确切的对应法,而不是如果有人包含的话。 此外,我需要用一个空白的“”代替鞋子,将整段一字删除。

if($body == "swear word") 
    return;
最佳回答
$swears = array("shoot", "darn", "heck");

foreach ($swears as $bad_word)
    $body = str_replace($bad_word, " ", $body);

这将是一个快速和次要的解决办法,尽管它确实有

问题回答

暂无回答




相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签