Postado Abril 22, 2015 10 anos Bom galera o status do meu nicaw acc nao esta funcionado (não esta aparecendo online quando ta online,a quantidade de players tambem nao e talz) e preciso de ajuda de vocês . Status.php <?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'] = 60; $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\">Server 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\">Server Offline</span>\n"; } ?> Status.xml <?xml version="1.0"?> <tsqp version="1.0"><serverinfo uptime="465" ip="127.0.0.1" servername="World of Dragon Ball Online" port="7171" location="Poland" url="" server="DevLand" version="" client="8.0"/><owner name="kogo to ots" email=""/><players online="0" max="120" peak="0"/><monsters total="4066"/><map name="" author="" width="" height=""/><motd>World of Dragon Ball Online Reverg</motd></tsqp>
Postado Abril 22, 2015 10 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Aprovação de Tópicos de Conteúdos" Para: "OTServ → Suporte OTServ → Suporte de WebSites" ➥ Regras | Seções OTServ | Seções BOT
Postado Abril 23, 2015 10 anos Autor O tópico foi movido para a área correta, preste mais atenção da próxima vez! Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido: De: "OTServ → Aprovação de Tópicos de Conteúdos" Para: "OTServ → Suporte OTServ → Suporte de WebSites" Você poderia me ajudar com este problema não ?
Postado Abril 23, 2015 10 anos Não tenho conhecimento nessa área, desculpe. ➥ Regras | Seções OTServ | Seções BOT
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.