");
date_default_timezone_set('Europe/London');
echo("The current date is ");
echo date("d/m/Y");
echo(" and the time is ");
echo date("H:i:s!");
echo("
");
// $auc = shell_exec("/home/pi/.pyenv/versions/3.9.0/bin/python /home/pi/Ab-Urbe-Condita/auc.py --now --simple --idiomatic");
$auc = nl2br(shell_exec("/home/pi/.pyenv/versions/3.9.0/bin/python /var/www/html/auc/Ab-Urbe-Condita/auc.py --simple --idiomatic"));
echo("$auc");
#echo(shell_exec("/opt/vc/bin/vcgencmd measure_temp"));
echo("");
$rawtemp = shell_exec("cat /sys/class/thermal/thermal_zone0/temp");
$temp = substr($rawtemp, 0, -4);
$tempdecimal = substr($rawtemp, 2);
echo("The current temperature is $temp.$tempdecimal °C");
$str = @file_get_contents('/proc/uptime');
$num = floatval($str);
$secs = fmod($num, 60); $num = (int)($num / 60);
$mins = $num % 60; $num = (int)($num / 60);
$hours = $num % 24; $num = (int)($num / 24);
$days = $num;
echo("
");
#echo("Up for ");
echo("The system has been up for $days day(s), $hours hour(s), and $mins minute(s)!");
echo("
");
$disk1 = shell_exec("du -sh /var/www/html/");
list($c, $d) = explode("/", $disk1);
echo("Disk space used by web server: $c");
echo("
");
$disk2 = shell_exec("df -hT /");
list($e, $f) = explode("%", $disk2);
list($g, $h) = explode("G ", $f);
echo("Disk space used on microSD card: $h/28G");
echo("
");
#$log = shell_exec("sed -n '$=' /var/log/apache2/access.log");
$uptime = shell_exec("uptime");
list($a, $b) = explode("e:", $uptime);
echo ("The load average is $b (averaged over 1, 5, and 15 minutes).");
#phpinfo();
#echo("
");
#ob_start();
#passthru("mcstatus tech189.duckdns.org:25567 status");
#$online = ob_get_clean();
#list($q, $r) = explode("players: ", $online);
#list($s, $t) = explode("No", $r);
#if($t == ""){
# $s = "[No data, the server is likely off]";
#};
#echo("Players online the Minecraft server: $s");
?>