 |

10-02-2009, 11:55 AM
|
|
Newcomer
|
|
Join Date: Aug 2009
Posts: 1
|
|
Runescape stats?
How do you get the stats from a player from the runescape site?
So far i could only figure out how to actually open the page etc.. not so hard. but how do i strip everything except for the levels and put them into vars?
Thanks in advance.
|

10-02-2009, 11:56 AM
|
|
Forum Addict
BANNED
|
|
Join Date: Dec 2008
Location: Split, Croatia
Posts: 266
|
|
Re: Runescape stats?
What the fu**?
|

10-02-2009, 02:53 PM
|
|
Legend
|
|
Join Date: Jan 2007
Posts: 10,902
|
|
Re: Runescape stats?
Highscores Lookup [Non-GUI] <---- Thats in java... but you might be able to figure it out.
__________________
PM me with any issues.
I do not MM or trade anything.
Anyone claiming to be me in a trade or MM is an imposter.
|

10-03-2009, 01:38 AM
|
|
Active Member
BANNED
|
|
Join Date: Jul 2009
Posts: 211
|
|
Re: Runescape stats?
Visit this webpage, it will help: http://runedata.com
|

10-12-2009, 11:13 PM
|
|
Active Member
|
|
Join Date: Apr 2008
Posts: 146
|
|
Re: Runescape stats?
You should use the lite version of the hiscores like so.
http://hiscore.runescape.com/index_l...layer=Username
That produces a string with rank, level, exp - starting with overall then iterating through the skills then on to the minigames ( rank, score )
They're separated with commas so a simple explode() would do the trick.. PM me with any questions if you need
Last edited by 'DnB' : 10-12-2009 at 11:14 PM.
|

10-18-2009, 04:42 AM
|
|
Member
|
|
Join Date: Apr 2008
Posts: 43
|
|
Re: Runescape stats?
To answer your question: parse the data received from the link 'DnB' posted. For example:
(sample data) http://hiscore.runescape.com/index_l...?player=Zezima
Code:
403,2372,1224767936
421,99,59476460
242,99,56616722
1207,99,39565202
200,99,61287324
232,99,37119213
454,99,14155051
24,99,63827235
5,99,200000000
1960,99,22203111
56,99,113793712
504,99,27239316
25,99,117368919
236,99,18094553
160,99,17565654
614,99,15789879
8,99,57473823
1298,99,13592655
5,99,200000000
572,99,18641464
375,99,19458833
690,99,16113397
7011,99,13187289
625,99,13229510
5341,95,8968614
2539,1944
-1,-1
-1,-1
-1,-1
-1,-1
I would first put these values into an array, separating by newlines. Then, I would display the rank, level, and xp for each skill until the last five (which are minigame ranks and scores.)
PHP Code:
<?php $parse["config"]["username"] = "Zezima"; $parse["config"]["skills"] = array("Overall", "Attack", "Defence", "Strength", "Hitpoints", "Ranged", "Prayer", "Magic", "Cooking", "Woodcutting", "Fletching", "Fishing", "Firemaking", "Crafting", "Smithing", "Mining", "Herblore", "Agility", "Thieving", "Slayer", "Farming", "Runecrafting", "Hunter", "Construction", "Summoning"); $parse["config"]["minigames"] = array("Duel Tournament", "Bounty Hunters", "Bounty Hunter Rogues", "Fist of Guthix", "Mobilising Armies"); $parse["contents"] = file_get_contents("http://hiscore.runescape.com/index_lite.ws?player=" . $parse["config"]["username"]); $parse["contents"] = explode("\n", $parse["contents"]); foreach ($parse["contents"] AS $k => $v) { if (!empty($v)) { if ((count($parse["contents"]) - count($parse["config"]["minigames"]) - 1) > $k) { $parse["temp"] = explode(",", $v); echo("<b>" . $parse["config"]["skills"][$k] . "</b>: rank=" . $parse["temp"][0] . "; level=" . $parse["temp"][1] . "; xp=" . $parse["temp"][2] . "<br />\n"); } else { $parse["temp"] = explode(",", $v); echo("<b>" . $parse["config"]["minigames"][$k-(count($parse["contents"]) - count($parse["config"]["minigames"]) - 1)] . "</b>: rank=" . $parse["temp"][0] . "; score=" . $parse["temp"][1] . "<br />\n"); } } } ?>
Note how the skills and minigames are arranged how they are in the high score list.
__________________
"No man is innocent and no man may therefore judge others from a standpoint of righteousness." - Albert Camus
Last edited by AADude : 10-18-2009 at 04:42 AM.
|
 |
|