summaryrefslogtreecommitdiff
path: root/news.php
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-10 22:42:11 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-10 22:42:11 +0100
commit1e8e02735b655caaa645f9849311eacc14348136 (patch)
tree7b03ee59606bcf26714957fba8bc1bc395453dc2 /news.php
parente8c862f939eeb3dc0dd0dea0eee5a7ae386d7bc8 (diff)
downloadserverdata-1e8e02735b655caaa645f9849311eacc14348136.tar.gz
serverdata-1e8e02735b655caaa645f9849311eacc14348136.tar.bz2
serverdata-1e8e02735b655caaa645f9849311eacc14348136.tar.xz
serverdata-1e8e02735b655caaa645f9849311eacc14348136.zip
Added the PHP scripts used on the update server
Diffstat (limited to 'news.php')
-rw-r--r--news.php29
1 files changed, 29 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");
+?>