summaryrefslogtreecommitdiff
path: root/versions.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 /versions.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 'versions.php')
-rw-r--r--versions.php19
1 files changed, 19 insertions, 0 deletions
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