From 76dd040d0e30042cdfd4210341c0cb4817966562 Mon Sep 17 00:00:00 2001 From: deadlocker8 <deadlocker@gmx.de> Date: Tue, 18 Oct 2016 19:45:19 +0200 Subject: [PATCH] bugfix --- index.php | 2 +- status-api.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 9d7a021..b9598e3 100644 --- a/index.php +++ b/index.php @@ -1,5 +1,5 @@ <?php -$json = file_get_contents("http://".$_SERVER['SERVER_NAME']."/status/status-api.php"); +include_once "status-api.php"; $infos = json_decode($json); $percentageRAMClear = substr($infos->memPercentageUsed, 0, strlen($infos->memPercentageUsed) -2); diff --git a/status-api.php b/status-api.php index 02f4e70..bbe2898 100644 --- a/status-api.php +++ b/status-api.php @@ -51,5 +51,5 @@ $infos = array( 'cpuLoad' => $load ); -echo json_encode($infos); +$json = json_encode($infos); ?> \ No newline at end of file -- GitLab