diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-02-14 20:13:09 +0000 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-02-14 20:13:09 +0000 |
commit | 481d1eca66e38154063b078b84fe76a830e5ac0d (patch) | |
tree | 936e79882218d32d4075f46ad85aff7cec199d2a /news.php | |
parent | fe02011f477c57c7461b2bc25456bd9426e98cd7 (diff) | |
parent | ef7a69afc170e8c60af91583d7c1488a7590fcab (diff) | |
download | serverdata-481d1eca66e38154063b078b84fe76a830e5ac0d.tar.gz serverdata-481d1eca66e38154063b078b84fe76a830e5ac0d.tar.bz2 serverdata-481d1eca66e38154063b078b84fe76a830e5ac0d.tar.xz serverdata-481d1eca66e38154063b078b84fe76a830e5ac0d.zip |
Merge commit 'mainline/master'
Conflicts:
db/item_db.txt
Diffstat (limited to 'news.php')
-rw-r--r-- | news.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/news.php b/news.php new file mode 100644 index 00000000..fff3ed8c --- /dev/null +++ b/news.php @@ -0,0 +1,28 @@ +<?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 = 'versions/' . date('Y-m-d') . '.txt'; + touch($file); + file_put_contents($file, '[' . date('H:i') . "] $agent\n", FILE_APPEND); +} + +$old_versions = array("TMW/0.0.23", "TMW/0.0.24", "TMW/0.0.24.1"); +$min_version = '0.0.25'; + +if (array_search($agent, $old_versions) !== FALSE) // Explicit check for saftey +{ + 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"; +} + +print file_get_contents("news.txt"); +?> |