PHP Code:
<?php
// Here Mssql Connects
$sqltb = "dbo.Killl"; // Table Name
$query = $mssql->dbQuery("TRUNCATE TABLE $sqltb");
$todaydate=@date("Y-m-d");
$dosya = fopen("c:\\Users\\Administrator\\Desktop\\BlackRogue+Package\\server\\Server\\".$todaydate."_FatalLog.txt", "r");
// Here Server Path :) or Gameserver Path
while( ! feof($dosya) ) {
$yaz = fgets($dosya);
$server=substr($yaz,20,15);
if($server=="[SR_GameServer]"){
$uniquekilled=substr($yaz,36,22);
if($uniquekilled=="Unique Monster Killed!"){
$uniquekilleds=substr($yaz,36,22);
if($uniquekilleds=="Unique Monster Killed!"){
$data=substr($yaz,0,10);
$hora=substr($yaz,11,8);
$minutos=substr($hora,3,2);
$hora=substr($hora,0,2);
$minutos=(int)$minutos+(60*(int)$hora);
$passou=$agoram-$minutos;
$fimpos=strrpos($yaz,"]",66);
$fimpos=$fimpos-66;
$uniquestr=substr($line,66,$fimpos);
$fimpos=strrpos($uniquestr,"]");
$unique=substr($uniquestr,0,$fimpos);
$fimpos+=6;
$char=substr($uniquestr,$fimpos,20);
list($tarih, $saat , $game, $uniq, $monster, $killed, $uniqadi, $by, $kill) = explode(" ", $yaz);
$uniqueadi = explode(" ",$yaz);
list ($perf, $log) = explode("[", $killed);
list ($perfs, $logs) = explode("]", $log);
list ($tarihh, $game, $zaman, $time) = explode("[SR_GameServer]", $tarih);
list ($tarihp, $saat) = explode("$todaydate", $tarihh);
if ($uniq == "UNIQUE[MOB_RM_TAHOMET]"){
$uniq = "Demon Shaitan";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_TK_BONELORD]"){
$uniq = "Lord Yarkan";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_AM_IVY]"){
$uniq = "Captain IVY";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_OA_URUCHI]"){
$uniq = "Uruchi";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_EU_KERBEROS]"){
$uniq = "Cerberus";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}
elseif ($uniq == "UNIQUE[MOB_KK_ISYUTARU]"){
$uniq = "Isyutaru";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif ($uniq == "UNIQUE[MOB_CH_TIGERWOMAN]"){
$uniq = "Tiger Girl";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}elseif($uniq == "UNIQUE[MOB_FW_TAESE_100]"){
$uniq = "Tai Sui(100 LvL)";
$query = $mssql->dbQuery("INSERT INTO $sqltb(name,uniq,tarih) VALUES('".$perfs."','".$uniq."','".$saat."')");
}
}}
}}
fclose($dosya);?>
<div class="page-body newsblock">
<div class="news-title">
Unique Ranking
</div>
<table style="border:1px solid #3f3f3f; border-radius: 8px 8px 8px 8px;padding: 4px;background-color:rgba(50,50,50,0.55);text-align:center;color: #fff;font-weight: bold; font-family: Arial, Helvetica, sans-serif;font-size:12px;" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);"></td>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Killer</td>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Uniq Name</td>
<td style="border:1px solid #3f3f3f;background:rgba(0,0,0,0.55);">Date</td>
</tr>
<?php
$rank = $mssql->dbQuery("SELECT top 50 * FROM $sqltb ORDER BY tarih desc");
$place = 1;
while($row = sqlsrv_fetch_array($rank, SQLSRV_FETCH_ASSOC)) {
echo '<tr>';
echo '<td style="border:1px solid #3f3f3f;">'.$place.'</td>';
echo '<td style="border:1px solid #3f3f3f;">'.$row['name'].'</td>';
echo '<td style="border:1px solid #3f3f3f;">'.$row['uniq'].'</td>';
echo '<td style="border:1px solid #3f3f3f;">'.$row['tarih'].'</td>';
echo '</tr>';
$place ++;
}
sqlsrv_free_stmt($rank);
?>
</table>