FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Server Status

 


yimaw
Code:
<?PHP
function serverstatus($host, $port) {
  $sock = @fsockopen($host, $port, &$num, &$error, 2);
  if ($sock) {
      if (getservbyport($port,"tcp")!=null) {
          $serv = getservbyport($port,"tcp");
      } else {
          $serv = "Unknown";
      }
      echo "<center>Server : <span style='color:green'>Online</span></center>";
      fclose($sock);
      unset($sock);
  }else{
      echo "<center>Server : <span style='color:red'>Offline</span></center>";
      unset($sock);
  }
}

//Ports To Scan
serverstatus("68.100.166.101", 4000);

//Dark Dragon
?>


this is a script that tells if a server is on or off
Related topics

Server status script
Frihost server status checker
Current server status
New Server Status page
How about adding server load to the server status script?

Server Status Page? Coming back anytime soon?
Is there new Server Status Gif
Checking Server Status, Ping a Server (lots of purposes)
Server Status.
Checking server status (ports) using PHP

Server Status & Server 3
Home Server Status Indicator
[RESOLVED] Server Load
Server Status
Live Web Server Status
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.