add info for browsers

This commit is contained in:
john30
2019-10-27 14:31:18 +01:00
parent 43f7660d66
commit 819463fc27
+10 -2
View File
@@ -1,12 +1,20 @@
<?php <?php
$agent = $_SERVER['HTTP_USER_AGENT']; $agent = $_SERVER['HTTP_USER_AGENT'];
if (substr($agent, 0, 5)==='ebusd') {
require_once('prepend.inc'); require_once('prepend.inc');
if (substr($agent, 0, 5)==='ebusd') {
$r = @file_get_contents('php://input'); $r = @file_get_contents('php://input');
header('Content-Type: text/plain'); header('Content-Type: text/plain');
$r = @json_decode($r, true); $r = @json_decode($r, true);
echo checkUpdate(@$r['v'], @$r['r'], @$r['a'], @$r['l']); echo checkUpdate(@$r['v'], @$r['r'], @$r['a'], @$r['l']);
exit; exit;
} }
header('HTTP/1.1 404 Not Found'); readVersions();
?> ?>
<html>
<head>
<title>ebusd update check service</title>
</head>
<body>
<p>latest ebusd version: <?=$versions['ebusd'][0]?></p>
<p>last update: <?=date('c', @filemtime('versions.txt'))?></p>
</body>