This code allows you to insert the last played song from Last.FM into your site using PHP.

This is a modification of the PHP RSS Reader which you can find here

1. Download this file and upload the PHP file to your server.
2. Insert this code into your page where you want it to appear.

$url = "YOUR Last.FM RSS HERE";
echo RSS_Display($url, 2);

3. Thats it!

If I missed something, let me know.

2 comments so far

Add Your Comment
  1. I need a clear idea how to track the last played in a website that is based on php.

    • Played how? If it’s through Last.FM then this should still work.