How To Display Last.fm Scrobbles On Your Site
Disclaimer: I didn't write this script; I've modified David Kadavy's TwitBlog script^ to display your Last.fm scrobbles and the time the track was scrobbled.
Before you can use this on your site, you'll need to install MagpieRSS; this script grabs the parsed feed from MagpieRSS and displays it in a visitor-friendly way. :)
Download the Last.fm.txt file (right click on the link » Save As) and open the file in Notepad.
Press Ctrl + G and type in 12 (this will take you to line 12).
Change /home/USER/public_html/magpierss/rss_fetch.inc to the server path where the rss_fetch.inc file is. If you don't know where it is, just change USER to your cPanel username.
Go down to line 16 and change /home/USER/public_html/cache to the server path where your cache directory is. If you don't know where it is but you installed MagpieRSS in your root directory, just change USER to your cPanel username.
Next, go down to line 20 and change http://ws.audioscrobbler.com/1.0/user/lirae666/recenttracks.rss to the URL of your Recent Tracks feed.
You can find this on your profile, just above the "Recently Listened Tracks" list.
Go down to line 23 if you want to change the amount of scrobbles you wish to display on your site. (I think the most amount of scrobbles you can show is 10.)
For now, leave line 26 as it is. This just sets how many hours ahead or behind your server time is, compare to Last.fm's server time.
If you find that the times are off, change +4 to how many hours off the times are.
For example: if the time the track was played is showing up as 9am, when you played it at 11am, change +4 to +6. Similarly, if the time is showing up as 11am, when you played the track at 9am, change +4 to +2.
Now resave the file as "last.fm.php" and upload it to the root directory of your site.
To show the list on your site, all you need to do is include the last.fm.php file in your sidebar: <?php include("/home/USER/public_html/last.fm.php");?> (change USER to your cPanel username).





