$path = "http://www.tibia.com/community/?subtopic=whoisonline&world=".urlencode($world); $members = split("<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%>\s|\S*</TABLE>",$members); // get the big parts $members = strip_tags($members[1],'<tr>'); //take the members element $members = preg_replace('!<TR BGCOLOR=#w{6,6}|</TR>!','',$members); $members = str_replace(' ',' ',$members); //Replace HTML entity with normal space. //End of BBMan code
//Clear unnecessary array values.
$characterSearch = str_replace(' ',' ',$name); //Recovert space to HTML entity for searching. //Apply ">" and "<" around name to eliminate chances of mistakenly reporting a name as online.
//If you don't do this, searching for Thor would return as online if someone had the name Asthorm.
$characterSearch = ">".$characterSearch."<";
//Get the numbers for the lists.
$inOnline = count($onlineList); $inOffline = count($offlineList); if (strpos($contents,$characterSearch)) { $onlineList[$inOnline] = $name;
} else {
$offlineList[$inOffline] = $name;
}
if ($onlineList[$inOnline] > '0'){ $stan = '[<font style="font-size: 8px; color: #00F000;">ON</font>]'; }
if ($onlineList[$inOnline] < '0'){ $stan = '[<font style="font-size: 8px; color: #FF0000;">OFF</font>]'; }
Skrypt nagle przestał działać, wydaje mi się że przez nie wielkie zmiany na stronie Tibi.com
Mógłby mi ktoś z ty pomóc?:-/