Last.fm Top 10 Albums Generator
I spent a few hours the yesterday and today fiddling around with the Last.fm API to see if it was easy to make a Top 10 Albums of All Time (as listened by a specific user) utility that generated the necessary statistics and displayed it all pretty and such. Read on to find out how I went!
Turns out if you know even a small amount of PHP (I’d consider myself reasonably confident with PHP), you can get a simple image with the band name, album and number of plays in your library. This is what it looks like:
All that can be done in about 100 lines of code, from < ?php to ?>. I intend on cleaning up the codebase and releasing it publicly. However, for now, I’ll be making the service public for people to generate their own albums code.
So, how do I go about this?
Simple! All you need to do is:
[url=http://theblahman.net/last.fm.php?user=USERNAME&num=NUMBER&type=link][img]http://theblahman.net/last.fm.php?user=USERNAME&num=NUMBER[/img][/url]
Where:
USERNAME is your Last.fm username; and
NUMBER is the ranking, you can go between 1 and 10
Please let me know on Twitter if you use this tool, I’d love to hear feedback from users!