get top albums

This returns the xml file for the top albums for the user.

$key='key';
$secret='secret';
$music_token='token';

$topalbums_url='http:ws.audioscrobbler.com2.0?method=user.gettopalbums&user={username}&limit=5&api_key=' . $key;
$top_albums = simplexml_load_file($topalbums_url);

foreach ($top_albums->topalbums->album as $album) {
	$rank = $album->attributes()->rank;
	$name=$album->name;
	$playcount=$album->playcount;
	$url=$album->url;
	$artist=$album->artist->name;
	$image=$album->image[1];
	if ($rank=='1'){
		$max=$playcount;
	}
}