Small php highscore thingy.

Results 1 to 8 of 8
  1. #1
    Game Developer MisterKid is offline
    MemberRank
    Jun 2009 Join Date
    1,585Posts

    Small php highscore thingy.

    I might not be known in this section of ragezone ~
    But I play runescape sometimes.

    I wanted to see if people where lieing about their stats and found the runescape.com highscore thing useless since you need to have some skills above lvl 60 to get in.
    This script show stat above lvl 30.

    I made it quickly and didn't really improve it was just so it works.

    I dont know if anyone could use it. But it could be used for fan based websites or Comparesing with the real runescape game.

    Anyway Here
    Or download here: http://ompldr.org/vOWplbQ/rs.rar
    PHP Code:
     <html>
    <head>
    <title>Runescape Stat Checker Created By Misterkid</title>
    </head>
    <body background="http://forum.ragezone.com/images/BgHead1_bg_short.jpg">
    <form method="post" action="index.php"  id="searchform">
     <table border="0" align="center">
            <tr>
               <td ><h3 align ="center" >Username</h3></td>
              <td ><input  type="text" name="username"></td>
              <td ><input  type="submit" name="submit" value="Search"></td>
                <tr >
                <a href="http://www.runescape.com/game.ws?j=1" target="_blank"><center><img src="http://forum.ragezone.com/images/runescape_logo.png" border="0"></center></a>
                </tr>
            </tr>
      </table>
    </form>  
    <p></body>
    </html>
    <?php
    echo'<table width="200" border="2" align="center" bgcolor="#666666" align="left">';
    if (!isset(
    $_POST['username'])) 
    {
        echo
    '<tr><td>';
        die(
    "Search a user");
        echo 
    '</td></tr>';
    }
    $user $_POST['username'];//'green098';//user
    if ($_POST['username'])
    {
        
    $file trim(@file_get_contents('http://hiscore.runescape.com/index_lite.ws?player='.$user));//Runescape high scores
        
    $stats explode(",",$file);//BOOM puts it in a array
        
        
    if(!isset($stats [1])) 
        {
            echo
    '<tr><td>';
            die(
    'User not found');
            echo 
    '</td></tr>';
        }
            
        
    $checkRanked $stats[0];
        if(
    $stats[0] != '-1')
        {
            echo
    '<tr><td>';
            echo(
    'Rank: '.$stats[0].'<br>');//Prints rank
            
    echo '</td></tr>';
        }
        else
        {
            echo
    '<tr><td>';
            echo(
    'Rank: Not Ranked<br>');
            echo 
    '</td></tr>';
        }
        echo
    '<tr><td>';
        echo(
    'Total Level: '.$stats[1].'<br>');
        echo 
    '</td></tr>';
        
    $totalExp $stats[2];//convert to string
        
    $totalExpSp preg_split('/\s+/'$totalExp);//Splite the space
        
    echo'<tr><td>';
        echo(
    'Total Exp: '.$totalExpSp[0].'<br>');    
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Attack: '.$stats[3].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Defance: '.$stats[7].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Constitution: '.$stats[9].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Ranged: '.$stats[11].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Prayer: '.$stats[13].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Magic: '.$stats[15].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Cooking: '.$stats[17].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Woodcutting: '.$stats[19].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Fletching: '.$stats[21].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Fishing: '.$stats[23].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Firemaking: '.$stats[25].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Crafting: '.$stats[27].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Smithing: '.$stats[29].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Mining: '.$stats[31].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Herblore: '.$stats[33].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Agility: '.$stats[35].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Thieving: '.$stats[37].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Slayer: '.$stats[39].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Farming: '.$stats[41].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Runecrafting: '.$stats[43].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Hunter: '.$stats[45].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Construction: '.$stats[47].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Summoning: '.$stats[49].'<br>');
        echo 
    '</td></tr>';
        echo
    '<tr><td>';
        echo(
    'Dungeoneering: '.$stats[51].'<br>');
        echo 
    '</td></tr>';
    }
    else
    {
        echo(
    'Search for a user');
    }    
        echo
    '</table>';
    ?>
    Screenshot
    Last edited by MisterKid; 19-07-11 at 12:07 PM.


  2. #2
    I need money in RS. Help? TiMxD is offline
    MemberRank
    Jun 2010 Join Date
    MineCraftLocation
    539Posts

    Re: Small php highscore thingy.

    Yeah, uhm. This don't work. :(

  3. #3
    Apprentice freddy123 is offline
    MemberRank
    May 2010 Join Date
    12Posts

    Re: Small php highscore thingy.

    thankssssssssssssssssssssssssssss

  4. #4
    right + down + X GhostSnyper is offline
    MemberRank
    May 2006 Join Date
    AZ, USALocation
    2,818Posts

    Re: Small php highscore thingy.

    BR?


    lol jk I'll test this later to see how well it works xD

    Thanks for the release

  5. #5
    Game Developer MisterKid is offline
    MemberRank
    Jun 2009 Join Date
    1,585Posts

    Re: Small php highscore thingy.

    Added screenshot + rared the php script with the images you migth neeed.

  6. #6
    Venture Adventure Tyler is offline
    LegendRank
    Nov 2008 Join Date
    United KingdomLocation
    4,443Posts

    Re: Small php highscore thingy.

    Oh, it's for RuneScape itself? I thought it was a private server highscore script xD

    Nice release though, I fully understand what you're trying to do.

  7. #7
    Member Kahvi is offline
    MemberRank
    Jul 2011 Join Date
    Helsinki, FinLocation
    51Posts

    Re: Small php highscore thingy.

    Shouldn't be too hard to modify it for a private server though.

  8. #8
    Venture Adventure Tyler is offline
    LegendRank
    Nov 2008 Join Date
    United KingdomLocation
    4,443Posts

    Re: Small php highscore thingy.

    Provided you have an extensive knowledge of PHP, no it shouldn't. Many RSPS still remain "flatfile", thus it would involve reading from text files in order to display the stats. For the many few that run MySQL, it would be extremely easy, although this script just reads direct from the RuneScape website, as opposed to a database.



Advertisement