diff --git a/index.php b/index.php
index 9d7a02109e0053de6abad7fde96bb46507e38464..b9598e3b4f236fba7dc8e48163c0b9b721f15922 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 02f4e700dcf6ee59e82ab00cbd87c709c3014ea9..bbe2898f0b21c0e910dded2a9e82046a54619dbc 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