X-Git-Url: http://git.shiar.nl/sc2-widget/blobdiff_plain/4d46f04b5ec1a9a7fbf8a5701fe7332f56080232..ae31cf0d5d4533c0f3dc35b75d7ff374e135c24f:/widget.php diff --git a/widget.php b/widget.php index d1b3b88..c996111 100644 --- a/widget.php +++ b/widget.php @@ -17,9 +17,9 @@ function error($message, $status = 500) exit; } -$request = trim($_SERVER['PATH_INFO'], '/'); +$request = trim($_GET['clan'] ?? $_SERVER['PATH_INFO'], '/'); $target = "data/$request.json"; -$last = file_exists($target) ? filemtime($target) : 0; +$last = file_exists($target) ? lstat($target)['mtime'] : 0; if ($last < time() - 3600) { $recipe = NULL;