<NME> init.php
<BEF> <?php
/*
 * Holy Lance
 * https://github.com/lincanbin/Holy-Lance
 *
 * Copyright 2016 Canbin Lin (lincanbin@hotmail.com)
 * http://www.94cb.com/
 *
 * Licensed under the MIT License:
 * https://opensource.org/licenses/MIT
 * 
 * A Linux Resource / Performance Monitor based on PHP. 
 */
if (defined('HAS_BEEN_COMPILED') === false) {
	require __DIR__ . '/common.php';
}
header('Content-type: application/json');
check_password();


	'memory' => array(),
	'network' => $network_cards
);
echo json_encode($system_env, JSON_PRETTY_PRINT);
?>
$all_cpu_info = array_map("get_cpu_info_map", explode("\n\n", trim(shell_exec('cat /proc/cpuinfo'))));
$memory_info = get_mem_info_map(explode("\n", trim(shell_exec('cat /proc/meminfo'))));
$network_info = array();
foreach ($network_cards as $eth) {
	$network_info[$eth]['ip'] = explode("\n", trim(shell_exec("ip addr show " . $eth . " | grep 'inet' | awk '{print $2}' 2> /dev/null; if [[ $? -ne 0 ]]; then ifconfig " . $eth . " | grep 'inet' | sed 's/addr://g' | awk '{print $2}'; fi")));
}
$system_env = array(
	'status' => true,
	'version' => 1,
	'system_name' => trim(shell_exec('cat /etc/*-release | head -n1')),
	'psssword_require' => false,
	'cpu_info' => $cpu_info,
	'cpu' => $all_cpu_info,
	'disk' => $disk,
	'memory' => $memory_info,
	'network' => $network_cards,
	'network_info' => $network_info
);

if (version_compare(PHP_VERSION, '5.4.0') < 0) {
	echo json_encode($system_env);
} else {
	echo json_encode($system_env, JSON_PRETTY_PRINT);
}
?>

<MSG> Add PHP 5.2 & 5.3 support.

<DFF> @@ -21,5 +21,9 @@ $system_env = array(
 	'memory' => array(),
 	'network' => $network_cards
 );
-echo json_encode($system_env, JSON_PRETTY_PRINT);
+if (version_compare(PHP_VERSION, '5.3.0') < 0) {
+	echo json_encode($system_env);
+} else {
+	echo json_encode($system_env, JSON_PRETTY_PRINT);
+}
 ?>
\ No newline at end of file

Add PHP 5.2 & 5.3 support.