| 
<?
 ########################################
 #########     SStatus Script    ########
 #########    by Markus Köplin   ########
 ########################################
 #########    Questions? Ask me!  ########
 #########    ICQ: 200915138        ########
 ########################################
 
 
 class sstatus
 {
 ############ This shows the "About" ############
 function about() {
 echo '<center>';
 echo '######################################<br />';
 echo '########### Server Status Script ###########<br />';
 echo '######################################<br />';
 echo 'Used to check Server Status and many more ;)<br />';
 echo '</center>';
 }
 ############ This checks the given IP-Adress ############
 function server($addr){
 if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
 return $addr;
 }
 
 ############ This is the main function ############
 function status($addr="",$port=80,$timeout=3) {
 if($addr=="") $addr = $_SERVER['REMOTE_ADDR'];
 $churl = fsockopen($addr, $port, $errno, $errstr, $timeout);
 if (!$churl)
 {
 echo 'Server is Offline'; ############ Server is now offline ############
 }
 else
 {
 echo 'Server is Online'; ############ Server is now online ############
 }
 }
 
 function portcheck($addr,$timeout,$port) {
 if($addr=="") $addr = $_SERVER['REMOTE_ADDR']; ############ If Ip-Address not given replace it with own IP ############
 $churl = @fsockopen($addr, $port, $errno, $errstr, $timeout);
 if (!$churl)
 {
 echo "Port $port do not run"; ############ This port is not used ############
 }
 else
 {
 echo "Port $port run"; ############ This port is used and marked red ############
 }
 
 }
 }
 ?>
 |