From 272bae0fa77072f4e6676bb49ce9ba815d93940c Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Tue, 10 Jul 2018 09:00:24 +0200 Subject: lib/format.php new --- lib/format.php | 33 +++++++++++++++++++++++++++++++++ mirrors/status.php | 8 ++------ 2 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 lib/format.php diff --git a/lib/format.php b/lib/format.php new file mode 100644 index 0000000..c250c8a --- /dev/null +++ b/lib/format.php @@ -0,0 +1,33 @@ + $urls ); -if (isset($_GET["json"])) { - header ("Content-type: application/json"); - print json_encode($content,JSON_UNESCAPED_SLASHES); -} else { - print "Unknown output format."; -} +export_as_requested($content); -- cgit v1.2.3-54-g00ecf