Cytat(md1988 @ 28.11.2010, 00:57:56 )

*to instrukcja ogólna, być może Tibia oferuje zdobywanie takich danych w przystępnej postaci.
No na pewno, bo jak inaczej listy ots zdobywają te wszystkie dane?
Znalazłem w internecie coś takiego:
<?php
$ip = "warots.net.pl";
$port = "7171";
$info = chr(6).chr(0).chr(255).chr(255).'info';
$sock = @fsockopen($ip, $port, $errno, $errstr, 1
); if ($sock)
{
$data='';
$data .= fgets($sock, 1024
); preg_match('/players online="(\d+)" max="(\d+)" peak="(\d+)"/', $data, $matches); print '<FONT class="uni_03">Status:</FONT><b><font face="verdana" size="2" color="#FFAA00"> Online</font></b><br>'; echo '<FONT class="uni_03">Players online: </FONT></b><FONT class="uni_04">'; echo $matches[1] . '/' . $matches[2
]; $h = floor($matches[1
] / 3600
); $m = floor(($matches[1
] - $h*3600
) / 60
);
print '<br><FONT class="uni_03">Monsters: </FONT><FONT class="uni_04">liczba online</FONT>'; print "<br><FONT class='uni_03'>Uptime: </FONT<FONT class='uni_04'> $h" . ($h==1?
'h' : ($h==2||$h==3||$h==4?
'h' : 'h')); print " $m" . ($m==1?
'm' : ($m==12||$m==13||$m==14?
'm' : ($m%10
==2||$m%10
==3||$m%10
==4?
'm' : 'm'))) . '</FONT>'; print '<br><FONT class="uni_03">Klient:</FONT><FONT class="uni_04">'.$klient;'</FONT>'; print '<br><FONT class="uni_03">Host:</FONT><FONT class="uni_04">'.$ip;'</FONT>'; print '<br><FONT class="uni_03">Port:</FONT><FONT class="uni_04">'.$port;'</FONT>'; print '<br><FONT class="uni_03">World type:</FONT><FONT class="uni_04">'.$server_type;'</FONT>'; print '<br><FONT class="uni_03">Experience:</FONT><FONT class="uni_04">'.$exp;'</FONT>'; $counthouse = count(glob("$dirdata/houses/*.*")); if($counthouse > 0)
{
print '<br><FONT class="uni_03">Houses:</FONT><FONT class="uni_04">'.$counthouse;'</FONT>'; }
else
{
print '<br><FONT class="uni_03">Houses:</FONT><FONT class="uni_04">--</FONT>'; }
}
else {
print '<font color=silver size=2> Status: <font color=red size=3><i>Ofline</i></center></font><br>';
}
?>
Odziwo działa, jednak nie do końca. Jak zmienię jakiś adres IP, wejdę na stronę to działa, ale jak już odświeżę, to już nie. Wszystko widać oprócz wyników, jedynie działa wtedy "Status". Co może być przyczyną?