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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
| <?
function makeHeader() {
echo "<html><head><title>Laatste 10 GoT topics</title><meta http-equiv=\"refresh\" content=\"10\"></head><body bgcolor=black link=black vlink=navy>\r\n";
echo "<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" width=\"250\" bordercolor=\"#000000\">\r\n";
echo " <tr>\r\n";
echo " <td bgcolor=\"#AAAAE6\"><strong>de got Active 10</strong></td>\r\n";
echo " </tr>\r\n";
echo " <tr>\r\n";
echo " <td bgcolor=\"#00084A\"><font color=\"#FDD103\" size=\"2\" face=\"MS Serif\">Laatste update [". date("d-m-Y") . "] - [" . date("H:i") . "] </font></td>\r\n";
echo " </tr>\r\n";
echo " <tr>\r\n";
echo " <td bgcolor=\"#AAAAE6\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\r\n";
echo " <tr>\r\n";
}
function makeFooter() {
echo " </tr>\r\n";
echo " <tr>\r\n";
echo " <td>&nbsp;<A HREF=\"http://xl.topstat.com/totaal.php?tellernummer=674269997\">[img]\"http://xl.topstat.com/count.php?tellernummer=674269997\"[/img]</A></td>\r\n";
echo " </tr>\r\n";
echo " </table>\r\n";
echo " </td>\r\n";
echo " </tr>\r\n";
echo "</table>\r\n";
}
$fora = array(
"FB" => 1,
"HA" => 6,
"PMG" => 7,
"VB" => 8,
"OIC" => 21,
"OCM" => 22,
"AV" => 9,
"GT" => 33,
"SA" => 10,
"VV" => 44,
"WOS" => 11,
"NOS" => 23,
"SP" => 12,
"DPC" => 5,
"NT" => 19,
"ANS" => 24,
"IT" => 4,
"W&G" => 13,
"PW" => 14,
"SG" => 1,
"NST" => 2,
"WL" => 3,
"HK" => 31,
"TF" => 25,
"LA" => 15,
"TFF" => 43,
"SU" => 26,
"TMF" => 16);
$topics = 10;
$fp=fopen("http://gathering.tweakers.net/forum/find#hitstart);
$str = fread($fp, 100000);
$pat = "topic('',0,'','','','','',0,0,0);";
$pat = preg_quote ( $pat );
$pat = str_replace ( "''", "'([^']+)'", $pat );
$pat = str_replace ( "0", "([0-9]+)", $pat );
if ( preg_match_all ( "/$pat/", $str, $gotactiva, PREG_SET_ORDER ) ){
makeHeader();
for ($i = 0; $i <= $topics -1; $i++) {
$got[topic] = $gotactiva[$i][1];
$got[title] = $gotactiva[$i][3];
$got[fora] = $gotactiva[$i][6];
if (strpos($got[title], "<\/a>") > 0) {
$tmp = strpos($got[title], "<\/a>");
}else{
$tmp = strlen($got[title]);
}
$got[title] = substr($got[title], 0, $tmp);
echo " <tr>";
echo " <td width=\"25%\" nowrap bgcolor=\"#AAAAE6\"><font size=\"2\" face=\"MS Serif\">&nbsp;<a href=\"http://gathering.tweakers.net/listtopics.php/" . $fora[$got[fora]]. "\">$got[fora]</a>&nbsp;</font></td>\r\n";
echo " <td width=\"75%\" nowrap bgcolor=\"#C3C3EB\"><font size=\"2\" face=\"MS Serif\">&nbsp;&nbsp;<a href=\"http://gathering.tweakers.net/showtopic.php/" . $got[topic] . "\">" . $got[title] . "</a>&nbsp;</font></td>\r\n";
echo " </tr>";
}
makeFooter();
}
?> |