summaryrefslogtreecommitdiff
path: root/world/map/news.php
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2011-06-18 21:58:47 -0700
committerBen Longbons <b.r.longbons@gmail.com>2011-06-19 14:19:55 -0700
commitbae4b92e560c2694eaaf0e8b4d9e95e56204471b (patch)
tree4acc120f6a94cfbf9694bf344658493de5aaa67b /world/map/news.php
parent319f80526f8585ecadaec986e37c9bd326f4d363 (diff)
downloadserverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.gz
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.bz2
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.tar.xz
serverdata-bae4b92e560c2694eaaf0e8b4d9e95e56204471b.zip
Move to a subdirectory
Diffstat (limited to 'world/map/news.php')
-rw-r--r--world/map/news.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/world/map/news.php b/world/map/news.php
new file mode 100644
index 00000000..7ab51a9c
--- /dev/null
+++ b/world/map/news.php
@@ -0,0 +1,30 @@
+<?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" || substr($agent, 0, 4) == "Mana")
+{
+ $file = 'versions/' . date('Y-m-d') . '.txt';
+ touch($file);
+ file_put_contents($file, '[' . date('H:i') . "] $agent\n", FILE_APPEND);
+}
+
+$min_version = '0.0.29.1';
+$cur_version = '0.5.2';
+
+if (substr($agent, 0, 3) == "TMW" and $agent < 'TMW/' . $min_version)
+{
+ echo "##1 The client you're using is no longer\n".
+ "##1 supported! Please upgrade to $min_version or\n".
+ "##1 higher!\n \n".
+ "##1 TMW Staff\n \n";
+}
+
+echo "##9 Latest client version: ##6$cur_version\n \n";
+
+print file_get_contents("news.txt");
+?>