• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

[Release] Logging Unique Kills on a Scheduled Task (php)

Newbie Spellweaver
Joined
Mar 22, 2012
Messages
31
Reaction score
14
Why dun you insert the textdata_object.txt file into a table and link it through a JOIN statement to the overview ;o so it'll cover all listed Uniques - doesn't matter the amount of new selfmade uniques

Hmm. Feel like I have more control this way. You might not want to show all uniques
 
Skilled Illusionist
Joined
Mar 12, 2012
Messages
338
Reaction score
27
would you have how to place in table so looks neat please i tried but then just get error :(
 
Skilled Illusionist
Joined
Mar 12, 2012
Messages
338
Reaction score
27
Flowlance - [Release] Logging Unique Kills on a Scheduled Task (php) - RaGEZONE Forums


looks very messy on site how to put into colums/tables ?

or just rls your ranking script from your site ;)
 
Last edited:
Newbie Spellweaver
Joined
Mar 22, 2012
Messages
31
Reaction score
14
Ah. Yeah it's messy, it's just a basic output page, I expect people to modify it to their liking. Hope this helps get you started:

PHP:
<html>
<head>
<title>Basic unique output page</title>
<style type="text/css">
table {
	border-collapse: collapse;
}

th {
	border: 1px solid #000;
	background: #eee;
}

tr {
	text-align: center;
}

tr:hover {
	background: #e7f0f5;
}

td {
	border: 1px solid #000;
}
</style>
</head>
<body>
<?php 
include("config.php"); 

// Add uniques you want to allow / display in the following array: 
$allowed = array( 
    'MOB_CH_TIGERWOMAN' => 'Tiger Girl', 
    'MOB_OA_URUCHI'     => 'Uruchi', 
    'MOB_KK_ISYUTARU'   => 'Isyutaru', 
    'MOB_TK_BONELORD'   => 'Lord Yarkan', 
    'MOB_EU_KERBEROS'   => 'Cerberus', 
    'MOB_AM_IVY'        => 'Captain Ivy', 
    'MOB_RM_TAHOMET'    => 'Demon Shaitan' 
); 

foreach($allowed as $k => $v) { 
    $uniques = empty($uniques) ? "" : $uniques . ","; 
    $uniques .= "'" . $k . "'"; 
} 

echo "<table cellspacing=0 cellpadding=0 style='width: 300px;'>
<tr><th>#</th><th>Name</th><th>Kills</th></tr>"; 
$counter=1;
$query = $mssql->query("SHARD", "SELECT TOP 15 CharName16, COUNT(*) AS Kills FROM UniqueKills WHERE Monster IN(".$uniques.") GROUP BY CharName16 ORDER BY Kills DESC"); 
while($row=$mssql->fetch($query)) { 
    echo "<tr><td>" . $counter . "</td><td>" . $row['CharName16'] . "</td><td>" . $row['Kills'] . "</td></tr>";
	$counter++;
}
echo "</table>

<br />

<table cellspacing=0 cellpadding=0 style='width: 400px;'>
<tr><th>Name</th><th>Killed</th><th>Time</th></tr>"; 
$query = $mssql->query("SHARD", "SELECT TOP 15 * FROM UniqueKills WHERE Monster IN(".$uniques.") ORDER BY Timestamp DESC"); 
while($row=$mssql->fetch($query)) { 
    echo "<tr><td>" . $row['CharName16'] . "</td><td>" . $allowed[$row['Monster']] . "</td><td>" . date("d-m-Y H:i", $row['Timestamp']) . "</td></tr>"; 
} 
echo "</table>";
?>
</body>
</html>
 
Skilled Illusionist
Joined
Mar 12, 2012
Messages
338
Reaction score
27
nice thnx

do u know whats causing this to display --> 
 
CPP/C#/PHP/ASM
Joined
Apr 7, 2009
Messages
452
Reaction score
189
I can write a class using mssql instead if that makes it easier. i like sqlsrv though, as it is fully supported with all sql server versions and have a lot of neat features. Harder yes.
Afaik mssql does not work with sql server 2008 or 2012 at all


you wrong my dear friend , im working with SQL'08 and mssql driver = PERFECT.
also tested with SQL'12 with mssql driver = PERFECT.

if you dont know how to setup apache/php correctly that's the cause .

do not misslead people.

anyway , nice release - but i already did something like that but from php cron job.

well , it works flewless and consume Really small amount of well , everything :D
 
Back
Top