Display the artwork and track info for your current last.fm track
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
artwork-fallback.png
last-fm-now-playing.php

README.md

Display your current track on last.fm

This is a simple PHP function that will get your most recently played from Last FM and display:

  • Track Name
  • Artist Name
  • Album Artwork

This is a simple drop-in function which will retrieve track info from the recentracks endpoint. If you're currently playing a track, then this will reflect and change 'Last Played' to 'Currently Playing.

To use this, you'll need your last.fm username and API keys (which you can generate from here)

This function even supports fallback artwork - because I've found that some 'obscure' tracks don't have album artwork on last.fm.

I'm currently using this in the footer of my blog