AnsS Posted April 13, 2010 Posted April 13, 2010 Other server status: <?php //////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// Created By Mentor (Orgyilkos) www.teamsrv.net //////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// $login_ip = "127.0.0.1"; $login_port = "2106"; $game_ip = "127.0.0.1"; $game_port = "7777"; $ventrilo_ip = "127.0.0.1"; $ventrilo_port = "3784"; $mysql_host = "127.0.0.1"; $mysql_user = "root"; $mysql_passwd = "root"; $mysql_db = "l2jdb"; /////////////////////////// ////////Login Server/////// /////////////////////////// $ls = @fsockopen ($login_ip, $login_port, $errno, $errstr, 1); if ( $ls ) $ls = "<font color=green>Online</font>"; else $ls = "<font color=red>Offline</font>"; /////////////////////////// ////////Game Server /////// /////////////////////////// $gs = @fsockopen ($game_ip, $game_port, $errno, $errstr, 1); if ( $gs ) $gs = "<font color=green>Online</font>"; else $gs = "<font color=red>Offline</font>"; /////////////////////////// ////////Vent Server /////// /////////////////////////// $ve = @fsockopen ($ventrilo_ip, $ventrilo_port, $errno, $errstr, 1); if ( $ve ) $ve = "<font color=green>Online</font>"; else $ve = "<font color=red>Offline</font>"; ///////////////////////////// ////MySQL Login Server/////// ///////////////////////////// mysql_connect($mysql_host, $mysql_user, $mysql_passwd) or die ("Nem sikerült csatlakozni a MySQL szerverhez!"); mysql_select_db($mysql_db) or die("Nincs ilyen adatbázis: ".$mysql_db); // All Accounts $accounts=mysql_numrows(mysql_query("SELECT * FROM accounts")); // Online Players Num $num=mysql_numrows(mysql_query("SELECT * FROM characters WHERE online=1 and accesslevel=0")); // Online GMs Num $gmnum=mysql_numrows(mysql_query("SELECT * FROM characters WHERE online=1 and accesslevel>0")); // All Alliance Num $alliance=mysql_numrows(mysql_query("SELECT * FROM clan_data WHERE ally_name!=\'\'")); // All Characters $char=mysql_numrows(mysql_query("SELECT * FROM characters WHERE accesslevel=0")); // All GM Characters $gmchar=mysql_numrows(mysql_query("SELECT * FROM characters Where accesslevel > 0")); // All Clan $clan=mysql_numrows(mysql_query("SELECT * FROM clan_data")); $gmnamesql = mysql_query("SELECT char_name FROM characters WHERE accesslevel>=1 AND online=1 ORDER BY char_name ASC"); while ($gmnam = mysql_fetch_object($gmnamesql)) { $gmname .= "<font color=green>$gmnam->char_name</font>, "; } ///////////////////////////// //////Adatok kiiratása/////// ///////////////////////////// print " <table width='100%' border='0'> <tr><td width='80%'><b>Auth Server:</b></td><td>".$ls."</td></tr> <tr><td width='80%'><b>Bartz Server:</b></td><td>".$gs."</td></tr> <tr><td width='80%'>Accounts:</td><td>".$accounts."</td></tr> <tr><td width='80%'>Online Players:</td><td>".$num."</td></tr> <tr><td width='80%'>Online GM:</td><td>".$gmnum."</td></tr> <tr><td width='80%'>Characters:</td><td>".$char."</td></tr> <tr><td width='80%'>GM Characters:</td><td>".$gmchar."</td></tr> <tr><td width='80%'>Clans:</td><td>".$clan."</td></tr> <tr><td width='80%'>Alliances:</td><td>".$alliance."</td></tr> <tr><td>Online GM: ".$gmname."</td></tr> </table> "; //////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////// Created By Mentor (Orgyilkos) www.teamsrv.net //////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////// ?> Credits: Mentor (Orgyilkos) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.