Quote:
|
Originally Posted by Raistlin
1. I think (more for the sake of vanity than for any other reason) that I would like to be able to upload a sort of "Server Status Page" to the web (have web space so that's not an issue). The idea being that I could then browse to the page from anywhere and see if the server is up, how long it's been running without falling over, get some basic information from it etc.
|
This will do you:
PHP Code:
<?php
$output = shell_exec('uptime');
echo "<html><title>Server Uptime</title><body><h1>Server Uptime:</h1><p>$output</p></body></html>";
?>
My version is running here:
http://richard.phpfuture.net:8080/
I used to have the
\\elisha has been up for: 30 day(s), 4 hour(s), 11 minute(s), 10 second(s) bit within <pre> tags but my mobile phone won't render text in these for some reason so I use <p> tags instead.
It's pretty cool being able to check if your server is OK when you're in the coffee shop.
You'll need either IIS & PHP or (recommended, for security) Apache & PHP.
I wrote a guide on this ages ago, which you can view here:
http://www.cableforum.co.uk/board/sh...701#post220701
If you have any questions I'm a bit of an Apache expert so don't be shy.
EDIT: Forgot to mention, you'll need the Uptime.exe file from M$ - just drop it into your c:/winnt/system32/ directory...
http://www.microsoft.com/technet/arc...ds/uptime.mspx
P.S - Check out my HTTP headers from the server for random Monty Python quotes.