Postado Novembro 28, 2015 9 anos Então galera eu abri um server de dbo + bleach + naruto.. e tipo no site ta la status: online players online não muda, aí do nada fica status off e mesmo se tiver on nao muda nada os player abaixo meu status.xml e status.php Spoiler <?xml version="1.0"?> <tsqp version="1.0"><serverinfo uptime="509151" ip="boruto.zapto.org" servername="Dbolegend +naruto+bleach" port="7171" location="Brazil" url="0" server="Jacolos Server (DBKO 0.8)" version="" client="8.0"/><owner name="Legend" email="0"/><players online="23" max="300" peak="23"/><monsters total="6234"/><map name="0" author="0" width="" height=""/><motd>Welcome to Dragon Ball Z The Revolution... Bem Vindos e Bom Jogo</motd></tsqp> Spoiler <?php include ('config.inc.php'); function getinfo($host='localhost',$port=7171){ // connects to server $socket = @fsockopen($host, $port, $errorCode, $errorString, 1); $data = ''; // if connected then checking statistics if($socket) { // sets 1 second timeout for reading and writing stream_set_timeout($socket, 1); // sends packet with request // 06 - length of packet, 255, 255 is the comamnd identifier, 'info' is a request fwrite($socket, chr(6).chr(0).chr(255).chr(255).'info'); // reads respond while (!feof($socket)){ $data .= fread($socket, 128); } // closing connection to current server fclose($socket); } return $data; } if ($cfg['status_update_interval'] < 60) $cfg['status_update_interval'] = 1; $modtime = filemtime('status.xml'); if (time() - $modtime > $cfg['status_update_interval'] || $modtime > time()){ $info = getinfo($cfg['server_ip'], $cfg['server_port']); if (!empty($info)) file_put_contents('status.xml',$info); }else $info = file_get_contents('status.xml'); if (!empty($info)) { $infoXML = simplexml_load_string($info); $up = (int)$infoXML->serverinfo['uptime']; $online = (int)$infoXML->players['online']; $max = (int)$infoXML->players['max']; $h = floor($up/3600); $up = $up - $h*3600; $m = floor($up/60); $up = $up - $m*60; if ($h < 10) {$h = "0".$h;} if ($m < 10) {$m = "0".$m;} echo "<span class=\"online\">Online</span><br/>\n"; echo "<span class=\"players\">Players: <b>$online/$max</b></span><br/>\n"; //echo "<span class=\"monsters\">Monsters: <b>".$infoXML->monsters['total']."</b></span><br/>\n"; echo "<span class=\"uptime\">Uptime: <b>$h:$m</b></span><br/>\n"; } else { echo "<span class=\"offline\">Offline</span>\n"; } ?> Editado Novembro 28, 2015 9 anos por blindado3000 (veja o histórico de edições)
Postado Novembro 28, 2015 9 anos 5 minutos atrás, blindado3000 disse: Então galera eu abri um server de dbo + bleach + naruto.. e tipo no site ta la status: online players online não muda, aí do nada fica status off e mesmo se tiver on nao muda nada os player abaixo meu status.xml e status.php Mostrar conteúdo oculto <?xml version="1.0"?> <tsqp version="1.0"><serverinfo uptime="509151" ip="boruto.zapto.org" servername="Dbolegend +naruto+bleach" port="7171" location="Brazil" url="0" server="Jacolos Server (DBKO 0.8)" version="" client="8.0"/><owner name="Legend" email="0"/><players online="23" max="300" peak="23"/><monsters total="6234"/><map name="0" author="0" width="" height=""/><motd>Welcome to Dragon Ball Z The Revolution... Bem Vindos e Bom Jogo</motd></tsqp> Ocultar conteúdo <?php include ('config.inc.php'); function getinfo($host='localhost',$port=7171){ // connects to server $socket = @fsockopen($host, $port, $errorCode, $errorString, 1); $data = ''; // if connected then checking statistics if($socket) { // sets 1 second timeout for reading and writing stream_set_timeout($socket, 1); // sends packet with request // 06 - length of packet, 255, 255 is the comamnd identifier, 'info' is a request fwrite($socket, chr(6).chr(0).chr(255).chr(255).'info'); // reads respond while (!feof($socket)){ $data .= fread($socket, 128); } // closing connection to current server fclose($socket); } return $data; } if ($cfg['status_update_interval'] < 60) $cfg['status_update_interval'] = 1; $modtime = filemtime('status.xml'); if (time() - $modtime > $cfg['status_update_interval'] || $modtime > time()){ $info = getinfo($cfg['server_ip'], $cfg['server_port']); if (!empty($info)) file_put_contents('status.xml',$info); }else $info = file_get_contents('status.xml'); if (!empty($info)) { $infoXML = simplexml_load_string($info); $up = (int)$infoXML->serverinfo['uptime']; $online = (int)$infoXML->players['online']; $max = (int)$infoXML->players['max']; $h = floor($up/3600); $up = $up - $h*3600; $m = floor($up/60); $up = $up - $m*60; if ($h < 10) {$h = "0".$h;} if ($m < 10) {$m = "0".$m;} echo "<span class=\"online\">Online</span><br/>\n"; echo "<span class=\"players\">Players: <b>$online/$max</b></span><br/>\n"; //echo "<span class=\"monsters\">Monsters: <b>".$infoXML->monsters['total']."</b></span><br/>\n"; echo "<span class=\"uptime\">Uptime: <b>$h:$m</b></span><br/>\n"; } else { echo "<span class=\"offline\">Offline</span>\n"; } ?> Olá, o seu site está offline aqui pra mim, não consigo acessá-lo para ver como está. Editado Novembro 28, 2015 9 anos por strakh (veja o histórico de edições) [Designer] / [Developer]
Postado Novembro 28, 2015 9 anos Autor Agora, lango rullez disse: Tem gesior instalado ? Sei arrumar pelo gesior nao tenho pelo gesior eu tambem sei mas por esse ta complicado :C
Postado Novembro 28, 2015 9 anos Então faz pelo gesior po.. Não perca tempo Qualquer coisa q eu consiga aqui eu edito e tento te ajudar !
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.