ServerStatus Page

Newbie Spellweaver
Joined
Jul 11, 2007
Messages
19
Reaction score
0
Code:
<?php
$srvip = "SERVER IP";
$srvport = "PORT";
$mssql_user = "";
$mssql_pass = "";
$mssql_database = "GunzDB";
$mssql_host = "LOCALMACHINE\SQLEXPRESS";
$conn = mssql_connect($mssql_host, $mssql_user, $mssql_pass);
mssql_select_db($mssql_database);
echo "<br><B>Server Status:</B> ";
$fp = @fsockopen($srvip, $srvport, $errno, $errstr, 1);
if (!$fp) {
    echo "<font style='color: #FF3300'><B>Offline</B></font></br>";
} else {
    echo "<font style='color: #009933'><B>Online</B></font></br>";
    fclose($fp);
}
// Fun
 
Last edited:
Is it that hard to make something ????

This is just an copy/past for an page.. Like the register pages..

Anti sql injection on an serverstatus page???
and the mssql user and pass ??? Not Needed for that..

Code:
<?
$srvip = "127.0.0.1";
$srvport = "6000";
$fp = @fsockopen($srvip, $srvport, $errno, $errstr, 1);
if (!$fp) {
echo "<font style='color: #FF3300'><B>Offline</B></font></br>";
} else {
echo "<font style='color: #009933'><B>Online</B></font></br>";
fclose($fp);
}
?>
must easier
 
o because i tried to make one myself and i thought that it will work if i copy the register page stuff for the server status ill be able to make one

EDIT: yes you do need the server host cuz i tried it and it didnt work

Off Topic: you admin register page didnt work for mine the sql injection didnt go so well
 
Back