I have an issue with shell_exec() on certain hosts, by default it's disabled on certain web hosts. I'm looking at running the same script without using shell_exec.
I'm looking for an alternative way to get the same result, any help would be appreciated.
$uptime = shell_exec("cut -d. -f1 /proc/uptime");
$days = floor($uptime/60/60/24);
$hours = $uptime/60/60%24;
$mins = $uptime/60%60;
$secs = $uptime%60;
echo "<div><hr><strong>Uptime</strong>: this server is up $days days $hours hours $mins minutes and $secs seconds</div>";