PhP "server status" script

If you make a Client-side script you can publish it here for other players to use
Locked
User avatar
Orbit Storm
Legendary Scribe
Posts: 254
Joined: Wed Oct 14, 2009 5:02 am
Contact:

PhP "server status" script

Post by Orbit Storm »

Okay.. so I've recently designed a script that essentially use for server status:


Code: Select all


/////////////////////////////////
/////      Copyright © 2009        /////
///// Orbit Storm & Bloodcraft /////
/////    Server Status Script    /////
///////////////////////////////

<?php
      $server_ip = ""; //Place your server's IP address inside the quotes.
      $server_port = ; //Place your server's port number one space after the equal sign.
      $x = "The server is: ";

      if(fsockopen($server_ip, $server_port, $errno, $errstr, 30))
      {
           $x .= "<b style=\"color:green;\">Online</b>."; //You may add an "online" image in place of the plain text format.
      }   
      else
      {   
           $x .= "<b style=\"color:red;\">Offline</b>."; //You may add an "offline" image in place of the plain text format.
      }

      echo $x;
?> 

Any questions, advice, tips, etc you may direct to me via this thread.
Image
Locked