LastFM Now Playing Script

LastFM Now Playing Script 1.0

No permission to download
Grab the currently playing / last played song from a Last.fm account and style it to your needs.

This is the first bit of PHP that I've ever done, so if there's anything that really sucks - I'd love to know!

Usage
1) You will need an API key from https://www.last.fm/api - enter this in $key
2) Enter the account username that you'd like to receive the most recent song played for in $user
3) Edit the echo to suit your needs, or leave it as it is to display artwork alongside artist - title with a link to the Last.fm page.​

Screenshots
g2evp4l.png upload_2018-8-23_0-46-10.png

Live example on https://verringer.com

Features
- Only requires API key and username inputting and is ready to use.
- Failover to local artwork image if last.fm doesn't have artwork for that song.
- Artist, Album, Title, Song, URL, Profile & Artwork can all be implemented in to your output.
- Default output already set (<a href="song"><img src="artwork">Artist - Title</a>)​

Outputs
For this example, the song is Mr. Brightside by The Killers from the album Hot Fuss being scrobbled by the user Verringer - all of these can be used to alter your output to your liking.

Artist:
The Killers​
Album:
Hot Fuss (Deluxe Version​
Title:
Mr. Brightside​
Song:
The Killers - Mr. Brightside​
Profile:
URL:
Artwork:

Note
If you have Last.fm do comment your username on the thread, it's a small community.

I'll gladly offer some help getting this set up in the thread.

Follow me on Last.FM, username is Verringer.​
Author
Verringer
Downloads
2
Views
63
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Verringer

Top Bottom