Aegis Support Board: Server Status Checker Page - Aegis Support Board

Jump to content

ASB News! ASB 5.0 Beta V2 has now been released!. See here for more Info.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Server Status Checker Page works with aegis

#1 User is offline   kg4hpz 

  • Average Member
  • PipPipPipPip
  • Group: Members
  • Posts: 168
  • Joined: 20-January 04

Posted 03 April 2004 - 02:49 AM

again i have prevaled upon skrunk to put up some more of his web code and he has agreed.

[skrunk]

ok this is a php script and again i didn't write it originally just fixed stuff and cleaned up code. credit should go to whoever wrote the original version.

replace the IPs that are in it with your server's IP.

you will either have to be able to run PHP on your personal webserver or have the page hosted on a web host that supports PHP

it's pretty easy to configure and i'm even tossing in the code to put it in an iframe and the background image i "barrowed" from you know who and moded for this page. server checker background image

real quick code notes : the background image is in a div table so you may need to adjust the placement of it. just change the LEFT and TOP values in the <div> tag until it's where you like it. drop the background image in a folder named images or change the pointer link to where ever you put it. also the Login port is set to 6900. if this is not your servers port then you will need to change it.

iframe code (put this in whatever page you want the server checker to appear or just ignore this and run the page by itself)

Quote

<IFRAME SRC="checker.php" name="checker" WIDTH="100%" frameBorder=0 height="397" marginHeight=0 marginWidth=42 scrolling=auto>
</IFRAME>


server status page

Quote

<head>
<title>
RO Status Checker by aegis
</title>
<script>
<!--
//enter refresh time in "minutes:seconds" Minutes should range from 0 to inifinity. Seconds should range from 0 to 59
var limit="0:20"

if (document.images){
var parselimit=limit.split(":")
parselimit=parselimit[0]*60+parselimit[1]*1
}
function beginrefresh(){
if (!document.images)
return
if (parselimit==1)
window.location.reload()
else{
parselimit-=1
curmin=Math.floor(parselimit/60)
cursec=parselimit%60
if (curmin!=0)
curtime=curmin+" minutes and "+cursec+" seconds left until page refresh!"
else
curtime=cursec+" secs left until server status refresh!"
window.status=curtime
setTimeout("beginrefresh()",1000)
}
}

window.onload=beginrefresh
//-->
</script></head>
<body scroll=no>

<DIV
style="HEIGHT: 32px; LEFT: 30px; POSITION: absolute; TOP: 75px; WIDTH: 270px">
<TABLE>
<TR>
<TD>
<IMG SRC="images/rochars.gif">
</TR>
</TD>
</TABLE>
</DIV>


<DIV
style="HEIGHT: 32px; LEFT: 10px; POSITION: absolute; TOP: 15px; WIDTH: 100%">
<font color="#FF0000">this section will auto refresh</font>
<BLOCKQUOTE>Server Status is directly perportional to your lag to the web server.<BR><BR>
<FONT COLOR="#cccccc">TRANSLATION:</FONT> <FONT COLOR="green" SIZE="3">UP</FONT> / <FONT COLOR="blue">DOWN</FONT> status is not 100% accurate.<BR><BR>So try to login if your unsure if server is up or down as lag to the web server may be lieing to us all.</BLOCKQUOTE>
<TABLE cellpadding=0 cellspacing=0 width=400 BORDER="0">
<TR>
<TD><DIV style="font-weight:bold"><H2>Server</H2></DIV></TD>
<TD><DIV style="font-weight:bold"><H2>Status</H2></DIV></TD>
<br>
</TR><TR>
</DIV>
</body>
<?PHP
/*

rights of aegis and others
*/
error_reporting(0);

$IP = array(
"Login Server" => "PUT YOUR IP HERE:6900",
"Character Server (might lag)" => "PUT YOUR IP HERE:7000",
"Interaction Server" => "PUT YOUR IP HERE:4000",
"Zone Server 1" => "PUT YOUR IP HERE:4501",
"NPC Server" => "PUT YOUR IP HERE:4501",
); while(list($ServerName,$Host)=each($IP)) {
list($IPAddress,$Port)=explode(":",$Host);
echo("<TD><DIV>".$ServerName."</DIV></TD><TD>");
if($fp=fsockopen($IPAddress,$Port,$ERROR_NO,$ERROR_STR,(float)0.5)) {
echo("<DIV style=\"color:'green';font-weight:'bold'\">UP</DIV>");
fclose($fp);
}
else {
echo ("<DIV style=\"color:'blue';font-weight:'bold'\">DOWN</DIV>");
}
echo ("</TD></TR><TR>");
}
echo ("</TABLE>");
?><BR><BR>

<?
echo $_SERVER['SERVER_SOFTWARE'];
?>

0

#2 User is offline   fangzor 

  • Junior Member
  • PipPip
  • Group: Members
  • Posts: 27
  • Joined: 17-July 03

Posted 22 June 2004 - 09:55 AM

I just want to say I <3 and want to have your babies. Thank-you for posting this it works great.
0

#3 User is offline   Buster 

  • Nu Sigma Phi
  • PipPipPipPipPip
  • Group: Members
  • Posts: 337
  • Joined: 09-January 04
  • Location:Manila

Posted 22 June 2004 - 11:18 AM

can I use this on the pc hosting Aegis, Apache, MSSQL? coz alot of scripts similar to this interfer with server operation and stop players from logging in...
0

#4 User is offline   echira 

  • Average Member
  • PipPipPipPip
  • Group: Members
  • Posts: 129
  • Joined: 25-November 03
  • Location:\\texas\houston\

Posted 26 June 2004 - 08:06 AM

@buster: doesn't matter. this system sends a simple packet via socket connection to the server to see if there's a response of ANY kind. if the server is up, it'll respond as "WTF!", otherwise, no response, the socket reports error, and it is reported as offline :hello:
0

#5 User is offline   Buster 

  • Nu Sigma Phi
  • PipPipPipPipPip
  • Group: Members
  • Posts: 337
  • Joined: 09-January 04
  • Location:Manila

Posted 26 June 2004 - 09:05 AM

well, what can I say .... :ph34r:
0

#6 User is offline   serra 

  • Average Member
  • PipPipPipPip
  • Group: Members
  • Posts: 123
  • Joined: 26-May 03

Posted 26 June 2004 - 08:59 PM

You can check if just the zone server or account server or one of the 4 servers you need is up. If that is the case, then you can say whether the whole thing is up or down without checking all of them.

Oh, yeah, you need to install php to use the script mentioned above.
0

#7 User is offline   anthonykewl20 

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 25-June 04

Posted 08 July 2004 - 04:37 PM

err <_< thus this script will work on ea txt version? or this is for sql version only? :haihai:

This post has been edited by anthonykewl20: 08 July 2004 - 04:38 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users