Re: [Release] Logging Unique Kills on a Scheduled Task (php)
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 Code:
<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>
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
nice thnx
do u know whats causing this to display --> 
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Quote:
Originally Posted by
serend
nice thnx
do u know whats causing this to display --> 
Where?
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Quote:
Originally Posted by
serend
Umm. Probably some encoding errors. It's not in the code. Try pasting it into a different text editor
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Fatal error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\Website\config.php on line 17
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Quote:
Originally Posted by
FrozenGames
Fatal error: Call to undefined function sqlsrv_connect() in C:\inetpub\wwwroot\Website\config.php on line 17
install sqlsrv in php
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Quote:
Originally Posted by
serend
install sqlsrv in php
how can I do that?! -.-!!!
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Quote:
Originally Posted by
tschulian
how can I do that?! -.-!!!
It's in the first post.
Sorry late reply, I haven't been around
1 Attachment(s)
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Getting this error:
Attachment 126233
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Quote:
Originally Posted by
Flowlance
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
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Re: [Release] Logging Unique Kills on a Scheduled Task (php)
Cannot connect to SHARD database