Revision 88, 0.9 KB
(checked in by exi, 16 years ago)
|
Added the new installer and modified readme.txt for this.
The needed SQl data will be supplied later.
|
Line | |
---|
1 | <?php |
---|
2 | $host = 'http://guard.griefwatch.net/'; |
---|
3 | $num_kills = 3480; |
---|
4 | $saveto = './mails'; |
---|
5 | exit('please edit file before running'); |
---|
6 | |
---|
7 | for ($i = 0; $i>=$num_kills; $i--) |
---|
8 | { |
---|
9 | $kill = $i; |
---|
10 | if (file_exists($saveto.'/'.$kill.'.txt')) |
---|
11 | { |
---|
12 | continue; |
---|
13 | } |
---|
14 | $url = $host.'?p=details&kill='.$kill; |
---|
15 | echo "reading kill $kill<br>\n"; |
---|
16 | $content = file_get_contents($url); |
---|
17 | $content = str_replace("\r\n", "", $content); |
---|
18 | $content = str_replace("\n", "", $content); |
---|
19 | |
---|
20 | $pattern = '^<div class="box" style="margin-top: 10px; display: none;" id="raw">.*?style="padding: 2px;">(.*?)<script type="text/javascript">^'; |
---|
21 | preg_match($pattern, $content, $raw); |
---|
22 | |
---|
23 | $mail = strip_tags(str_replace('<br>', "\r\n", $raw[1])); |
---|
24 | |
---|
25 | if ($kill) |
---|
26 | { |
---|
27 | $fp = fopen($saveto.'/'.$kill.'.txt', "w"); |
---|
28 | fwrite($fp, $mail); |
---|
29 | fclose($fp); |
---|
30 | flush(); |
---|
31 | } |
---|
32 | } |
---|
33 | ?> |
---|