Jump to content


Server Status Script

  • Please log in to reply
1 reply to this topic

#1 corbin

  • Staff Alumni
  • Advanced Member
  • 8,129 posts

Posted 03 June 2006 - 08:41 PM

Well, I run a small site which checks the status (online/offline) of several servers (13) and the way i have it working is i have the [a href=\"http://l2status.no-ip.org\" target=\"_blank\"]main site[/a] include a page through an IFRAME which includes 4 other pages through IFRAMES. index.php has an IFRAME to status.php which opens IFRAME's to servers/1.php servers/2.php so on. And then in the servers/X.php pages it includes servers/config.php which is this:

   $server[$ServerName]="<font color=\"#00ff00\">Online</font>";
  $server[$ServerName]="<font color=\"#00ff00\">Online</font>";
   $server[$ServerName]="<font color=\"#ff0000\">Offline</font>";

and an example servers/X.php file is (i changed the IP addresses):

<body bgcolor="black"text="#FFFFFF">
 $IP = array(
  "ia_login" =>"",
  "ia_victoria" =>"",
include("config.php"); ?>
<div align="center" style="font-size: 12; font: bold;">
Login: <?  echo $server['ia_login']; ?><br>
Aria: <? echo $server['ia_aria']; ?><br>
Victoria <? echo $server['ia_victoria']; ?><br>
<div align="center">
<? fclose($fp); ?>

So anyway... my question is... is there a more efficient way to go about doing the same thing?
Why doesn't anyone ever say hi, hey, or whad up world?

#2 poirot

  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 03 June 2006 - 08:42 PM

You can use fopen or similar functions to try to reach the various mirros.

If you don't get a response, most likely they are down.

[a href=\"http://www.php.net/fopen\" target=\"_blank\"]http://www.php.net/fopen[/a]
~ D Kuang

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users