summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--news.php29
-rw-r--r--resources2.php8
-rw-r--r--versions.php19
3 files changed, 56 insertions, 0 deletions
diff --git a/news.php b/news.php
new file mode 100644
index 00000000..1804bcc2
--- /dev/null
+++ b/news.php
@@ -0,0 +1,29 @@
+<?php
+header("Content-type: text/plain");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+$agent = $_SERVER['HTTP_USER_AGENT'];
+
+if (substr($agent, 0, 3) == "TMW")
+{
+ file_put_contents('versions.txt', "$agent\n", FILE_APPEND);
+}
+
+if ($agent == "TMW/0.0.23")
+{
+ echo "##1 The client you're using is no longer\n".
+ "##1 supported! Please upgrade to 0.0.25 or\n".
+ "##1 higher!\n \n";
+}
+else if ($agent == "TMW/0.0.24" ||
+ $agent == "TMW/0.0.24.1")
+{
+ echo "##1 On Monday, November 3rd, support for your\n".
+ "##1 client version will be dropped. Please\n".
+ "##1 upgrade to 0.0.25 or later!\n \n TMW Staff\n \n";
+}
+
+print file_get_contents ("news.txt");
+?>
diff --git a/resources2.php b/resources2.php
new file mode 100644
index 00000000..de77e978
--- /dev/null
+++ b/resources2.php
@@ -0,0 +1,8 @@
+<?php
+header("Content-type: text/plain");
+header("Cache-Control: no-store, no-cache, must-revalidate");
+header("Cache-Control: post-check=0, pre-check=0", false);
+header("Pragma: no-cache");
+
+print file_get_contents ("resources2.txt");
+?>
diff --git a/versions.php b/versions.php
new file mode 100644
index 00000000..3b2729de
--- /dev/null
+++ b/versions.php
@@ -0,0 +1,19 @@
+<?php
+$versions = file('versions.txt');
+$verinfo = array();
+foreach($versions as $ver) {
+ if ($verinfo[$ver] != null) {
+ $verinfo[$ver]++;
+ } else {
+ $verinfo[$ver] = 1;
+ }
+}
+arsort($verinfo);
+$total = count($versions);
+echo '<table border="1px" cellspacing="0px"><tr><th>Client</th><th>No.</th><th>%</th></tr>';
+foreach($verinfo as $vi=>$vc) {
+ echo '<tr><td>' . $vi . '</td><td>' . $vc . '</td><td>' . round((100/$total)*$vc,2) . '</td></tr>';
+}
+echo '</table><br />Total number of connections: ' . $total . '<br />Number of different clients reported: '
+ . count($verinfo) . '<br /><br />Data retrieved: ' . date('D M d y, g:i a T', filemtime('versions.txt'));
+?> \ No newline at end of file