Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[RELEASE]PHP Ranking Script base using API

Newbie Spellweaver
Joined
Dec 4, 2007
Messages
67
Reaction score
19
It's a Simple List for the pvp ranking and reputation of the players script.
The same uses own connection from the server API.

A SS from this script:
SBvZQdT - [RELEASE]PHP Ranking Script base using API - RaGEZONE Forums


Tutorial check C://innetpub/wwwroot/api/php/dbinfo.inc.php
and open and edit the line:


Code:
echo "Connection Could be established. \ n";


and edit


Code:
echo "";


Open Notepad and put this on.


Code:
<?php require "../api/php/dbinfo.inc.php" ?>
<title>Ranking</title>
<?PHP
// Especificar tabela a usar
    $table = 'UsersChars';


    // Query
    $strSQL = "SELECT TOP 10 *
    FROM UsersChars 
    ORDER BY Stat01 DESC
        
                
                ";
?>
<table border="1" style="width:300px">
<tr>
<td>Nome</td>
<td>Kills</td>
<td>Reputacao</td>
</tr>


<?php
    $objQuery = sqlsrv_query($conn, $strSQL) or die ("Erro ao executar a query: [".$strSQL."]");
    while($objResult = sqlsrv_fetch_array($objQuery))
    
    {
    $tag = $objResult["Gamertag"];
    $kills = $objResult["Stat01"];
    $rep = $objResult["Reputation"];
    ?>
    <?php
    /*echo "<tr><td>";
    echo $tag;
    echo "</td><td> | Kills = <font color=red>";
    echo $objResult["Stat01"];
    echo "</font></td></tr>";*/
    ?>
    <tr>
<td><?PHP echo $tag?></td>
<td><?PHP echo $kills?></td>
<td><?PHP echo $rep?></td>
</tr>
    
    <?php
    }
    ?>
</table>


Note:
This is a base of a rankking


Modify the will to your liking.

To change the number of players move in this line

Code:
$ strSQL = "SELECT TOP 10 *

Change 10 to the amount of your choice
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Dec 4, 2007
Messages
67
Reaction score
19
As I said this is a base of rank script accessed by the database API.
I am even more scripts based programming and soon others will post here as: changing password
add gc
ban
among others ...
 
Experienced Elementalist
Joined
Oct 12, 2013
Messages
217
Reaction score
68
Appreicate the post.....This is what I got so far for my Leaderboard :) Nothing crazy but figured id share.

 
Experienced Elementalist
Joined
May 15, 2013
Messages
240
Reaction score
19
Error :S
Erro ao executar a query: [SELECT TOP 10 * FROM UsersChars ORDER BY Stat01 DESC ]
Can you help me?
 
Newbie Spellweaver
Joined
Dec 4, 2007
Messages
67
Reaction score
19
which source do you use?


check up on your DB exists UsersChars table and if there are Stat00, Stat01, Stat02, Gamertag and Reputation fields.
 
Back
Top