* Online Player count (Return Array of Player Count as integer)
*/
function PlayerCount() {
Global $Srv_Host, $Srv_Username,$Srv_Password,$Srv_Database;
$Connection = mysql_connect($Srv_Host, $Srv_Username, $Srv_Password) or die(mysql_error());
mysql_select_db($Srv_Database, $Connection);
$query = "SELECT COUNT(*) as total FROM `char` WHERE online = '1'";
$cresult = mysql_query($query, $Connection);
mysql_close($Connection);
$resarray = mysql_fetch_array($cresult);
$playeronline = $resarray["total"];
return $playeronline;
}
?>
To visualize(display) the state of the server
and :
<?php
/*
* Configurations file (rAthena Status)
* Writen by Lawliet (EaScriptable.de.vu)
* Non Licensed (do what you want)
*
*/
$Srv_Host = "192.168.0.4";
// Login, Char, Map Server Port
$Srv_Login = 6900;
$Srv_Char = 6121;
$Srv_Map = 5121;
// Database Settingsipmysql:127.0.0.1
$Srv_Database = "**************";
$Srv_Username = "************";
$Srv_Password = "*************";
// Status Text
$Str_Loginsrv = "Login Server:";
$Str_Charsrv = "Char Server:";
$Str_Mapsrv = "Map Server:";
$Str_onlinepl = "Player Online:";
$Str_Online = '<font color="green">Online</font>'; // (Online) + COLOR
$Str_Offline = '<font color="red">Offline</font>'; // (Offline) + COLOR
?>
Which(Who) connects to the server etc...
But concerns(marigolds) it is because when I go on the internet page, he(it) marks me that the server refuses him(her) the access, have you a solution?
Question
kisoft
Here is my concerns(marigolds), I would like to integrate(join) on my site which is on the host of the waiter(server) this :
Link to comment
Share on other sites
0 answers to this question
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.