Last x Songs Played (website feature)

This one is a “reverse” feature of a script that I found in the German forums a while back. The original script looked at the next X items and saves them to a PHP file so that you can publish your “up and coming” songs on your website*. What my script will do is maintain a list of the last 10 songs played and save them to a file so that a PHP Include can be used on a website.

Criteria for an item being a “song” will be:

  • Duration: 90sec - 7mins
  • Logging Option Enabled

Doing this via the Playlist History should be quite easy, however - I only have 3 items as my default history setting, I suspect most have the same as 10 is a bit extreme. I expect to have some fun with this one :wink:

I’ll post something shortly…

  • This isn’t really allowed in the UK - Those lovely folk at PPL/PRS only allow us to announce EITHER Artist or Title. Advanced publication of playlists (not withstanding the commercial damage it could do if your competitors see it) would have them foaming at the mouth.

Hi Charlie.

Is there a way to show the last so many songs played on a webstite? I think there is isn’t there?

I was thinking, due tot eh fact that beds are used int eh news etc that culd easily be in the criteria of songs, would it be possible to only publish files to the web ‘last played’ that have an “s” tag for song or something to that effect?

Thanks, Ryan.

Yes of course, Ryan, you would simply modify the script producing the PHP to check for (e.g.) S as the Type or whatever other criteria you specify. Charlie’s script I believe already applies the ‘time’ criterion to keep things simple, but it’s up to you to change it to work in the way that’s best for you—and I’m sure Charlie or I could do any mods. you need if you’re not up to ‘DIY!’


Hi guys once again!

Would it be possible for a script to show currently playing item within the criteria that it’s over 1 minute and less than 5 minutes (i.e. a song)?

I’m no god with coding of this nature, so any help would be muchly appreciated.

I figure that it would be pointless having upcoming or just played songs in the situation we shall be using it in.

Thanks, Ryan.