Well thats used for getting information on server's current status ( such as map and players online ) thats a totally different story
i thought about checking the status with fsockopen for the monitoring
for example
$current_status = '';
$server_status = @fsockopen($TMPL['server_ip'], $TMPL['server_port'], $errno, $errstr, 1);
if($server_status >= 1){
$TMPL['current_status'] = 'Online';
fclose($server_status);
}else{
$TMPL['current_status'] = 'Offline';
}
I actually have all the features except the monitoring, so yeah, my goal is to make a chart with server status history by percentage
Basically my problem was is lack of knowledge of how should i record the status to the database, to maybe a json file or db ( mysql ) or what should it actually record during 24 hour period, like do i record the exact time etc, how should my table designed ( ip | port | timestamp | status ) o.o
also i'm still not sure of how do i make script run automatically without leaving the script open and exploitable in case if someone will figure out somehow to send packets to the php file located link