前 次 新10 1- 板 カキコミ
[355]◆cBxokWcrTw 2009/10/01(木) 00:55:19 ID:dhh5gr2Q
>>353
度々追加での質問、失礼いたします。
携帯固体情報で投稿否定をしたいです。
そこでNGワードを改変して携帯固体情報が一致した場合に、
投稿拒否を出すことは可能でしょうか?
ご返答、よろしくお願いいたします。
#====================================================
# NGワード
#====================================================
$tomatofile = "../test/tomato.cgi";
if(is_file ($tomatofile)){
$tomatoword = file($tomatofile);
foreach($tomatoword as $tmp){
$tmp = rtrim($tmp);
if (preg_match("/$tmp/", $_POST['MESSAGE'])) {
DispError("ERROR!","ERROR:NGワード($tmp)が含まれています。");
}elseif (preg_match("/$tmp/", $_POST['FROM'])) {
DispError("ERROR!","ERROR:NGワード($tmp)が含まれています。");
}elseif (preg_match("/$tmp/", $_POST['mail'])) {
DispError("ERROR!","ERROR:NGワード($tmp)が含まれています。");
}
}
}
#-------------------------------PC各板アクセス拒否リスト
if (is_file($PATH."uerror.cgi")){
$IN = file($PATH."uerror.cgi");
foreach ($IN as $tmp){
$tmp = trim($tmp);
if (stristr($HOST, $tmp)) DispError("ERROR!","書き込み規制中!");
if (stristr($_SERVER['REMOTE_ADDR'], $tmp)) DispError("ERROR!","書き込み規制中!");
}
}
前 次 カキコミ
r.php ver2.5 (2005/03/28)