[Release] Server Status Script
#1


<?php

// Enter Server Connection Info Here
$server = array(
host => "localhost",
lport => "4001",
gport => "4110"
);
// Enter MySQL Connection Info Here
$mysql = array(
host => "localhost",
user => "root",
pass => "root"
);

echo "";

// Check Active Sockets
echo "Server StatusLoginServerOnlineOffline";
}
echo "GameServer";
$fp2 = @fsockopen($server[host],$server[gport],$errno,$errstr,2);
if($fp2) {
echo "Online";
fclose($fp2);
} else {
echo "Offline";
}
echo "";

// Pull Online Player Count
$con = mysql_connect($mysql[host],$mysql[user],$mysql[pass]);
$result = mysql_query("SELECT COUNT(*) FROM newproject_db.t_users WHERE a_zone_num <> -1",$con);
$online = mysql_result($result, 0);
echo "Online Players".$online."";

echo "";

// Coded By Warmonger

?>

 

Download: 2



Messages In This Thread
[No subject] - by Warmonger - 11-23-2011, 01:32 AM
[No subject] - by -=Reidi=- - 11-23-2011, 03:02 AM
[No subject] - by GuXz - 11-25-2011, 02:45 AM
[No subject] - by soyouare - 11-25-2011, 05:23 AM
[No subject] - by WarmongerII - 11-26-2011, 11:19 PM
[No subject] - by alex111 - 05-02-2012, 07:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)