[code]<?php
error_reporting(E_ALL);

function GetRSstats($username,&$result)
{
	# Return: Boolean
	# And an empty array in your second parameter on failure, or filled with the skills on success.
	# Please note; no support is given.
/*
###
### Made By Chessspider ( www.chessspider.nl - 2007© ) 
###
### Please leave this notice here. If you really want to make me happy, also put a link to my runescape world switcher:
### http://worldswitcher.chessspider.nl/
### on your website.
*/
		# You might have to update these some day...
	$arrSkills = array(
			"Total",
			"Attack",
			"Defence",
			"Strength",
			"Hitpoints",
			"Ranged",
			"Prayer",
			"Magic",
			"Cooking",
			"Woodcutting",
			"Fletching",
			"Fishing",
			"Firemaking",
			"Crafting",
			"Smithing",
			"Mining",
			"Herblore",
			"Agility",
			"Thieving",
			"Slayer",
			"Farming",
			"Runecraft",
			"Hunter",
			"Construction",
			"Summoning"
			); // Skills... Order DOES matter, it should always be the same order as the highscores page.

	$sDomain = "http://hiscore.runescape.com/"; // With trailing /
	$sPage = "index_lite.ws?player="; // Page to request

		# You shouldnt have to change anything from here
	$arrLevels = @file($sDomain.$sPage.urlencode($username),FILE_IGNORE_NEW_LINES); // Obtaining scores, surpressing possible warnings
	$result = Array();

	if($arrLevels === false || empty($username) || strlen($username) > 15)
		return false;

	$iLength = count($arrSkills);
	for($i = 0;$i < $iLength;$i++)
	{
		$levels = explode(",",$arrLevels[$i]);

		$arrStats[$arrSkills[$i]]["skill"] = $arrSkills[$i];
		$arrStats[$arrSkills[$i]]["rank"] = $levels[0];
		$arrStats[$arrSkills[$i]]["level"] = $levels[1];
		$arrStats[$arrSkills[$i]]["exp"] = $levels[2];
	}

	$result = $arrStats;
	return true;
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
<head>
<title>Stat lookup</title>
</head>
<body>
<?php

	if(GetRSstats("ChessSpider",$stats))
	{
		echo "<table width=400>\n<tr><th>Skill</th><th>Rank</th><th>Level</th><th>XP</th></tr>\n"; 
		foreach($stats as $values) 
			echo "<tr><td>".$values['skill']."</td><td>".$values['rank']."</td><td>".$values['level']."</td><td>".$values['exp']."</td></tr>\n"; 
			
		echo "</table>\n"; 
	}
	else
	{
		echo "Username does not exist";
	}
?>
</body>
</html>[/code]