PDA

View Full Version : Server Status Script?



LogenWilson
12-08-10, 09:06
Hello

Actually I am looking for a manual or free script, which will helps me to generate a server status script. I mean one that shows everything, mail server, FTP, MySQL, etc....... On my main server I've Ensim Pro machines running RH 7.3 and I also have couple of cPanel reseller accounts as well.

Thanks

jeremyc
12-09-10, 05:44
According to my experience you should consider below script to display your server status. This is simply the core you need to add it more functionality.


status.php

Code:


<?php


// To match the location of the status images please change the following URLs
$online = "online.gif";

$offline = "offline.gif";



// Change the address & port

$addr = "$server";

$port = $port;



// No need to change below lines.
$churl = @fsockopen($addr, $port, $errno, $errstr, 20);

if (!$churl) {

header("Location: $offline");

} else {

header("Location: $online");

}

?>



Call the script with an image tag,


Code:


<img src="status.php?server=domain.com&port=80">