useCached(); $rss->title = $Config['hp']." Server ".$_GET['server']." Top Players"; $rss->description = "Top Players"; $rss1=explode('engine/stats_rss.php',$_SERVER["PHP_SELF"]); $rss->link = "http://".$_SERVER["SERVER_NAME"].$rss1[0]; if($Config[$_GET['server']]["game"]=="css"){ $string= "64"; }elseif($Config[$_GET['server']]["game"]=="dods"){ $string= "53"; }elseif($Config[$_GET['server']]["game"]=="hl2dm" || $Config[$_GET['server']]["game"]=="tf2"){ $string= "12"; } if($Config[$_GET['server']]["connect"]=="lan"){ $datei="../conf/mani_name_ranks_".$_GET['server'].".txt"; $steam= "3"; }else{ $datei="../conf/mani_ranks_".$_GET['server'].".txt"; $steam= "0"; } $row = 1; $max = 21; $handle = fopen($datei, "r"); while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) { if(!function_exists('mb_convert_encoding') && file_exists("../engine/uft2html.php")){ require_once('../engine/utf2html.php'); } $name = mb_convert_encoding($data[$string], 'HTML-ENTITIES', 'UTF-8'); $id = $data[$steam]; $points = $data[4]; $head = $data[6]; $kills = $data[7]; $url = "http://".$_SERVER["SERVER_NAME"].$rss1[0]; $url2 = "?ipath=".$Config[$_GET['server']]['game']."&server=".$_GET['server']."&ID="; if($row<$max){ $item = new FeedItem(); $item->title = "#$row ".$name.""; $item->link = "$url$url2$id"; $item->description = "Points - $points Headshots - $head Kills - $kills"; $rss->addItem($item); } $row++; } fclose($handle); $rss->saveFeed("RSS1.0", "../conf/feed_".$_GET['server'].".xml"); echo " "; ?>