What alternative methods can be used to check server uptime instead of the provided PHP script?

The issue with the provided PHP script for checking server uptime is that it relies on the server's `uptime` command, which may not be available or accessible on all servers. An alternative method to check server uptime is to use the `exec()` function with a different command that is more universally supported, such as `uptime` or `cat /proc/uptime`.

// Alternative method to check server uptime using the 'uptime' command
$uptime = exec('uptime');
echo $uptime;