Evony Guides and Help
Trik Forum - RuneScape Forum  
Register Forum Homepage Members Mark Forums Read


Trik Members: 34,707 | Total Posts: 134,006 | Total Threads: 25,847
Welcome to our newest member, bramsseto.
Go Back   Trik Forum - RuneScape Forum > Off-Topic > General Discussion
Reload this Page Server status page - extended
General Discussion Feel free to talk about anything and everything in here.


Reply
 
Thread Tools Display Modes
Server status page - extended
Old
  (#1)
Supah Fly is Offline
Corporal
Supah Fly is an unknown quantity at this point
 
Posts: 123
Join Date: Dec 2007
Location: everywhere
  Send a message via MSN to Supah Fly Send a message via Skype™ to Supah Fly 
Default Server status page - extended - 05-13-2008, 07:28 PM

Idk who the original author was but I revised it so it would be better for my website, rspserver.com (serverstatus.rspserver.com).

Give credits if you use this.

Config.php
PHP Code:
<?php
$Host 
"localhost";
$User ""//Your database user
$Password ""//Your database password
$DBName "serverstatus"//Your database name
$TableName "serverstatus"//leave this as it is or it wont work
?>
Index.php
PHP Code:
<?php
include('config.php');

$Link mysql_connect ($Host$User$Password);
$Query "SELECT * from $TableName";
$Result mysql_db_query ($DBName$Query$Link);
$_get[1];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Server Status - RSPServer.com</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link rel="stylesheet" type="text/css" href="default.css" />
</head>
<body>
<div id="header">
    <div id="header_inner">
        <h1><a href="http://www.rspserver.com"><span>RSPS</span>erver.com</a></h1>
        <div id="slogan"><a href="index.php">Home</a> - <a href="http://www.rspserver.com">Forums</a></div>
    </div>
</div>
<div id="main">
<?
$action 
$_GET["action"];
$server $_GET["server"];

if (
$_GET[server]) {
$query=mysql_query("SELECT * FROM serverstatus WHERE IP='$server'");
  while(
$_results=mysql_fetch_array($query)) {
    
$_name=$_results["Name"];
    
$_port=$_results["Port"];
    
$_info=$_results["comm"];
  }
  
$checkCurr = @fsockopen("$server""$_port"$ERRNO$ERRSTR1);
if(
$checkCurr) {
$echoo '<font color="blue"><b>Online</b></font>';
}
else {
$echoo '<font color="red"><b>Offline<b></b>';
}
  
$dp '<tr><td>Server Name:</td></tr><tr><td> <b>'.$_name.'</b></td></tr><br />
<tr><td>Server IP:</td></tr><tr><td> <b>'
.$server.'</b></td></tr><br />
<tr><td>Port:</td></tr><tr><td> <b>'
.$_port.'</b></td></tr><br />
<tr><td>Information:</td></tr><tr><td> <b>'
.$_info.'</b></td></tr><br />
<tr><td>Status:</td></tr><tr><td> '
.$echoo.'</td></tr><br />
<br />Decided to change your mind? Head on back to the <a href="index.php">Main Page</a>!</a>
<br />Or if you want, you can add your own server <a href="index.php?action=register">here</a>!
<br />
<br />
<div id="footer">
    &copy; 2008 RSPServer.com
</div>'
;
die(
$dp);
}

if (
$action == "register") {
$dp '<form action=index.php method=register>
<table>You can only add online servers to this list.
<tr><td><br /></td></tr>
<tr><td>Server Name:</td></tr><tr><td><input type=text name=name></td></tr>
<tr><td>Server IP:</td></tr><tr><td><input type=text name=ip></td></tr>
<tr><td>Port:</td></tr><tr><td><input type=text name=port></td></tr>
<tr><td>Information:</td></tr><tr><td><input type=text name=comm></td></tr>
<tr><td><input type=submit name=n></td></tr></table>
</tbody>
<br />Decided to change your mind? Head on back to the <a href="index.php">Main Page</a>!</a>
<br />
<br />
<div id="footer">
    &copy; 2008 RSPServer.com
</div>'
;
die(
$dp);
}
elseif(
$action == "register2") {
echo (
'<br />');
echo (
"Your Server has been successfully added to the list!");
echo (
'<br />');
}
elseif(
$action =="fail") {
echo (
'<br />');
echo (
'Your server has not been added because it is offline!');
echo (
'<br />');
}
?>

<table>
<tbody>

<td class="header" width=150><b><u>Server Name</u></b></td>    <td class="header" width=50><b><u>Status</u></b></td>    <td class="header" width=160><b><u>IP Address</u></b></td>    <td class="header" width= 50><b><u>Port</u></b></td>    <td class="header" width=30><b><u>Uptime</u></b></td>

</thead>
<?

if ($Result) {
while (
$Row mysql_fetch_array ($Result)) {
@
mysql_connect($Host$User$Password) or die(mysql_error());
@
mysql_select_db ($DBName) or die(mysql_error());
$checkCurr = @fsockopen("$Row[IP]""$Row[Port]"$ERRNO$ERRSTR1);
$total "$Row[Total] + 1";
echo (
'<tr>');
echo (
'<td class="lista">');
echo (
"<a href=index.php?server=$Row[IP]>$Row[Name]</a>");
echo (
'</td>');
echo (
'<td class="lista">');
if(
$checkCurr) {
$uptime "$Row[Uptime] + 1";
echo (
'<font color="blue"><b>Online</b></font>');
$UpdateDB mysql_query("UPDATE `serverstatus` SET Uptime = $uptime WHERE Uptime = $Row[Uptime]");
}
else {
echo (
'<font color="red"><b>Offline<b></b>');
}
$UpdateDB2 mysql_query("UPDATE `serverstatus` SET Total = $total WHERE Total = $Row[Total]");
echo (
'</td>');
echo (
'<td class="lista">');
print (
"$Row[IP]");
echo (
'</td>');
echo (
'<td class="lista">');
print (
"$Row[Port]");
echo (
'</td>');
echo (
'<td class="lista">');
$accuracy $uptime/$total;
if (
$accuracy == 1) {
$accuracy $accuracy 100;
}
else {
$accuracy 100 $uptime/$total;
}
print (
"<b>$accuracy%</b>");
echo (
'</tr>');
}
}
else {
$create 'CREATE TABLE `serverstatus` (
`Name` VARCHAR (20) NOT NULL,
`IP` VARCHAR (50) NOT NULL,
`Port` VARCHAR (6) NOT NULL,
`comm` TEXT (50) NOT NULL,
`Uptime` VARCHAR (999999) NOT NULL,
`Total` VARCHAR (999999) NOT NULL,
PRIMARY KEY (`Name`)
)'
;
$query3 mysql_query($create);
mysql_close();
}

$ip $_REQUEST['ip'];
$port $_REQUEST['port'];
$comm $_REQUEST['comm'];

function 
refresh ($time$topage) {
echo 
"<meta http-equiv=\"refresh\" content=\"{$time}; url={$topage}\"
/> "
;
}

$checkReg = @fsockopen("$ip""$port"$ERRNO$ERRSTR1);
if(
$checkReg) {
$chicken 'true';
} else {
$chicken 'false';
}

if(
$chicken == 'true') {
$name $_REQUEST['name'];
@
mysql_connect($Host$User$Password) or die(mysql_error());
@
mysql_select_db ($DBName) or die(mysql_error());
$Query2 mysql_query("INSERT INTO `serverstatus` (`Name`, `IP`, `Port`, `Uptime`, `Total`, `comm`) VALUES ('$name', '$ip', '$port', '1', '1', '$comm')");
mysql_close();
refresh(0,"index.php?action=register2");
}
elseif(
$chicken == 'false') {
}
else {
refresh(0,"index.php?action=fail");
}

?>
</table>
<br />Want to add your server in the above list? Click <a href="index.php?action=register">here</a> to.<br> It must be online before you enter it, if it is offline, it will not work.</a>
<br />
</div>
<div id="footer">
    &copy; 2008 RSPServer.com | &copy; 2008-2009 SupahFly.net
</div>

</body>
</html>
Again: I have no idea who made this. I just added a template and shit.

DOWNLOAD FILES (you're gonna need these):


.
  
Reply With Quote Share with Facebook
Old
  (#2)
Tubz is Offline
Major General
Tubz is an unknown quantity at this point
 
Posts: 856
Join Date: Apr 2008
Location: Wales// Cardif// Uk
  Send a message via MSN to Tubz  
Default 05-14-2008, 06:51 AM

Whats this for =D ?


I am Zikky Hikky had my name changed


Want to RWT like a pro via BH

With my Guide it is possible to do 200m in 1 minute!
http://trik.com/forum/showthread.php...596#post120596

My Vouches & mm Thread
15/25 vouches
8/10 trades
soo close to offical =D

http://trik.com/forum/showthread.php..._mm-20472.html
---------------------
  
Reply With Quote Share with Facebook
Old
  (#3)
Supah Fly is Offline
Corporal
Supah Fly is an unknown quantity at this point
 
Posts: 123
Join Date: Dec 2007
Location: everywhere
  Send a message via MSN to Supah Fly Send a message via Skype™ to Supah Fly 
Default 05-14-2008, 04:18 PM

Quote:
Originally Posted by Zikky Hikky View Post
Whats this for =D ?
Server status page, duh.


.
  
Reply With Quote Share with Facebook
Old
  (#4)
Tubz is Offline
Major General
Tubz is an unknown quantity at this point
 
Posts: 856
Join Date: Apr 2008
Location: Wales// Cardif// Uk
  Send a message via MSN to Tubz  
Default 05-15-2008, 07:56 AM

yeh whats that =D


I am Zikky Hikky had my name changed


Want to RWT like a pro via BH

With my Guide it is possible to do 200m in 1 minute!
http://trik.com/forum/showthread.php...596#post120596

My Vouches & mm Thread
15/25 vouches
8/10 trades
soo close to offical =D

http://trik.com/forum/showthread.php..._mm-20472.html
---------------------
  
Reply With Quote Share with Facebook
Old
  (#5)
a legend is Offline
Private Second Class
a legend is an unknown quantity at this point
 
Posts: 67
Join Date: Jan 2008
Location: edgeville.
  Send a message via AIM to a legend Send a message via MSN to a legend  
Default 05-16-2008, 05:33 PM

the server status tells you which private servers are off and on, i like p servs so if i was home i'd be downloading


[SIGPIC][/SIGPIC]
A_Legend
  
Reply With Quote Share with Facebook
Old
  (#6)
TiLt is Offline
Sergeant
TiLt is on a distinguished road
 
Posts: 265
Join Date: Dec 2007
   
Default 05-28-2008, 10:59 PM

you fucking legend! lolz

Thanks supah


  
Reply With Quote Share with Facebook
Old
  (#7)
Cold is Offline
Private
Cold is an unknown quantity at this point
 
Posts: 35
Join Date: May 2008
Location: Ever wonder where ur socks go when you lose them? meheheheh
  Send a message via Yahoo to Cold  
Default 05-29-2008, 12:52 PM

cool thx mopar is always full
  
Reply With Quote Share with Facebook
Old
  (#8)
Zolid is Offline
Private
Zolid is on a distinguished road
 
Posts: 32
Join Date: Dec 2007
   
Default 05-29-2008, 10:42 PM

Like I told you before, Great Job =D
  
Reply With Quote Share with Facebook
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off





======================================================================================== ---------------------------------------------------------------------------------------- ========================================================================================

Your Ad Here

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Copyright © Trik.com