Winamp Tracker
About a week ago I came up with the music tracking PHP script that uses information stored on last.fm servers. I found this to be very slow at times. I'm not saying last.fm is a slow service, just that when the busiest time of the day comes along it can take up to 15 seconds to load information from last.fm.
This is my solution. This uses a third party plugin (Now Playing) and a script I wrote to store song information on the local server in a MySQL database. The script is set up to store title, artist, album, year, time last played, and if you set up an amazon web service account the script will display album art.
I have done my best to make this script as simple and user (noob) friendly as possible. Follow these steps to get this program running (I will eventually be adding screenshots to make this easier):
- Download the Winamp Tracker script here
- Extract them (unzip them) to a folder
- edit the mysql.ssi.php file to reflect your proper MySQL info
- edit update.php and set a password
- upload the files to your server
- run /path/to/program/install.php to create the database table
- on success delete the install.php file for security
- Download the Winamp Now Playing plugin here
- create an amazon web service account here (optional for album art)
- Install the Now Playing plugin (Winamp shouldn't be running...)
- Go to winamp preferences | general purpose | now playing plugin
- click options | web services and paste amazon account into (opt)
- click connections and create a new http post connection
- name: whatever, url: http://yourdomain.com/path/update.php
- set both song history and update frequency to 1
- set the extra data to 'yourpass=1'
- select all audio options and click accept and apply
That *should* be all there is to it. When a new song starts playing, you will get a pop up in the corner of your desktop with the track info and the album art. This can be disabled from the plugin settings. That plugin goes to the url you set up for this script and posts the info to the script. The script then puts that info into a database.
*Note on the password. If your password is biscuits, set the extra data field to be biscuits=1. In the next release I'll set it up to say password=biscuits but for now that is how it is set up.
If you go to /path/to/program/viewer.php, you can view the last 10 songs played. viewer.php isn't meant to be left as is, it is really meant to be copied and pasted into a page of your choice however it works fine loading it directly.
I hope you enjoy using this program as much as I enjoyed the four hours writing it. If you have any problems feel free to contact me and I'll see what I can do to help.
A demo is visible here.
To do:
- Timezone support
- More customization options (time played vs. last played)
- Allow for multiple user support
- Change mypass=1 to password=mypass
- Restructure the database to be more complex
- ^Will allow for top artist, top song, blah blah blah
This script is one of my more popular ones. All of the items on the to do list are simple enough to complete, I've just been uber busy/lazy lately.



