Note: This page is for historical purposes. It covers the use and installation of the file-based, non-ajax version of EZ Scrobbler. The latest version may be found here.
Download | Introduction | Installation | Configuration options | Troubleshooting | Warranty
The EZ-Scrobbler plugin is a Word Press 1.5/2 plugin that allows you to display your most recently listened-to tracks as reported by the audioscrobbler service at last.fm
Last.fm is a free service (as of this writing) that uses a plugin for your media player to log what you’ve listened to recently. It’s a nice service to keep statistics of the styles of music you listen to, who you listen to, and what particular songs you listen to the most. There are also some nifty community features such as “people who listen to this also listen to x” which is excellent for finding new music.
To use this plugin you must have a last.fm account already set up, and the corresponding reporting plugin for your music player of choice.
(note: from here on out, whenever I refer to “plugin”, I’m referring to the WordPress plugin, not the plugin for your media player)
Introduction
There are already several plugins available to handle audioscrobbler song listing in Word Press blogs (indeed, originally this plugin was a slight modification of Ted Pearson’s plugin.) Most of them, however, have a few potential problems in their use:
- Difficult to install for novice users
- Difficult to configure for novice users
- May cause slow page loads (or even break your blog) due to last.fm’s responsiveness
- If you’re an ambitious developer, very difficult to understand and modify without breaking something
EZ Scrobbler attempts to solve all these issues in a friendly, extendable manner. I am a professional programmer by day, so (at least in theory) completeness in error correction and user interface is achieved to make this plugin painless to use. Having said that, I welcome any comments, bug reports, and feature suggestions — feel free to contact me with any of these, or even just to say, “Thanks”.
Installation is essentially
- Upload to your plugin directory
- Activate the plugin
- Enter your last.fm username
- Tell your WP template where to display it
For more detailed instructions, keep reading.
Installation
The installation assumes you have some familiarity with how to use WordPress’ administration interface. A full explanation of how to use the features of the admin interface is outside the scope of this documentation.
- Sign up for an audioscrobbler account It’s sort of silly to try to use this if you don’t have one
- Download and extract the EZ scrobbler plugin
- Upload all the files from the zip file (ez-wp-scrobbler.php, the ez-scrobbler-files directory) to your plugins folder at your Word Press blog
- Activate the plugin using WordPress’ plugin interface

- After you’ve activated the plugin, there will be a new EZ Scrobbler menu under the WordPress Options menu.

Go there and enter your last.fm username, then click the Update button

(A detailed description of each section is described in this document under Settings) - Lastly, edit your theme to display the track listing where you want on your blog. Most people will want to display it in their sidebar, but you may put the display call anywhere you like
- Go to your WordPress Presentation menu, then click Theme Editor. By default, the theme you want to edit should be selected

- Click on your Footer Template and add the following code at the end:
<?php
do_action('wp_footer');
?> - Next, choose where you want to display the song list. I have mine in the Sidebar Template. Copy the following code to the appropriate template file you want to use, in the place you want to display it:
<?php
get_scrobbler();
?>
- Go to your WordPress Presentation menu, then click Theme Editor. By default, the theme you want to edit should be selected
- That’s it!
Configuration Settings
There are several settings available under the previously mentioned EZ Scrobbler options page. They are as follows:

- Your username for your account at last.fm
- Use this to select how many previous songs should be listed. It can list 1 previous song up to 10 previous songs. This is somewhat limitted by what last.fm keeps track of — after a certain period of time with no listening, last.fm resets your recent tracks list to zero.
- The format for displaying your recent track information. This allows you to specify artist, song, and date listened in whichever order you desire.
- The separator to put between artist, song name, and date according to personal taste.
- Date format and what to display for recently listened times (if date was chosen to display). Currently, month and day will always be first. I am now accepting ideas on how to sensibly display the concept of reordering each of the date fields. Let me know if you have any ideas.
- Should the artist and track name be links to last.fm’s registry for those particular fields? If checked, the artist will be a link to a page on last.fm and what it knows about that artist. Likewise for the song name. (This may end up being a 404 if your music is untagged or tagged incorrectly; something I have no control over.)
- Display a progress indicator while contacting last.fm. Sometimes last.fm is rather slow, so it’s nice to have an animated gif to indicate to your readers that something’s actually happening. It should be noted that if last.fm does not respond or if you have no recently listened tracks, “no recent track” will be displayed in place of this image. This value should be an image filename with web directory. If your file is at http://your.host.nam/pictures/file.gif, you would enter /pictures/file.gif
- Any tag you would like to wrap around the output. For example, if you want to list your tracks in an ordered list in the sidebar, your get_scrobbler() call should be placed inside <ol> tags and this field should have
liin it. If you want it in <span> tags you would typespanhere. This field may be left blank if you don’t require special formatting. - This is the server the plugin should ask for recent tracks. You should never have to change this.
- The port on the server EZ Scrobbler should use when contacting. You should never have to change this, either.
- The time limit in seconds after which EZ Scrobbler considers last.fm to be offline. This value may not actually be used as it’s dependent on your internet provider. Valid values are any positive number, though effectively 30 seconds should be considered an upper limit (some internet hosts only wait for this long by default.)
Note that you should never have to edit the connection settings. They are provided in case audioscrobbler ever changes its reporting server.
What to do in case of problems
This plugin was written with the idea that it would automatically work out of the box and handle any exceptional situations gracefully. However, there is a possibility (and probably likely) that I haven’t thought of some situations that could cause problems. Below are a few known issues that might be showstoppers:
- Ensure that you have activated the plugin through WordPress’ plugin interface, as listed in the installation instructions
- Ensure that you have pasted the do_action(’wp_footer’) line properly into your footer template
- Ensure that you have pasted the do_scrobbler line properly into your sidebar template (or whichever template you decided to use
- Make sure last.fm is actually up and running
- Make sure your audio player is actually submitting track information and last.fm is accepting it. You can check this by going copying this line:
http://ws.audioscrobbler.com/rdf/history/YOUR_LASTFM_USERNAME
into your browser’s address bar. You’ll see a bunch of odd data, but there should be songs and artists in there. I mention this and not your last.fm profile because I’ve found that sometimes the profile will be updated, but the service this plugin uses won’t be updated. - Make sure you have the correct permissions for the plugin cache directories and the settings file. The plugins directory should look something like this:

If it does look like that but still does not solve your problem, use your FTP program of choice to change them. This varies by client, but there should be a File Permissions menu or option to change read/write access on files for User (you), Group, and Other (everyone). Your server may require Group write, or even Other set to Execute, Read, and Write. Keep in mind that if you require Other to make it work, this may be a security liability as ANYONE on your server can put files in there with it set to Other:Write. - Likewise, check the permissions on the scrobbler.rdf and ez-scrob-settings.ini.php files, both located under the ez-scrobbler-files directory

The permissions depicted work on my host. Again, the instruction and warnings apply for these two files as they do in the previous item — if you have to set these to be world-writable for things to work, this can be a liability as anyone on your server can now edit them, if they know about their existence and location. - Lastly, if something extraordinary happens that causes your site or admin pages to not display or show errors at the top, you can solve the problem by deleting the ez-wp-scrobbler.php plugin from your plugins directory. Be sure to let me know if this happens. Thanks!
Warranty and Attributions
Warranty
No warranty of any sort is stated or implied as to this plugin’s ability to function, ability to cause filesystem damage or deletion of files, or fitness for a particular purpose including the one intended. Any person or persons who activate this plugin in the WordPress software or otherwise runs this script on any computer anywhere agrees through said use to assume full responsibility and liability for any adverse affects such as deletion of file data, system instability, or interference with other installed software, even if said adverse affects are a direct or indirect result of executing this and included scripts.
Attributions
This code is Copyright 2005 Jonathan Warner and free for public, non-commercial use in perpetuity with no restrictions, provided mention of myself and Ted Pearson as originating authors is made in the header. Commercial use may be authorized on a case-by-case basis, determined by Jonathan Warner brink@fleshy.org.nz
At the time of this writing, this plugin uses the free last.fm/audioscrobbler service. No guarantee is made that said service will remain free or available, and no association with last.fm is stated or implied. Use of this plugin in conjunction with last.fm may be subject to their terms and conditions, which this warranty does not cover.

35 responses so far ↓
1 brrt // Nov 9, 2005 at 3:47 pm
Hi, great plugin. I use it!
One thing: there is some character “bug”. With the band “Bløf” (a dutch band) it displays “Bløf”. I think this will happen with some other characters too?
2 brink // Nov 9, 2005 at 6:11 pm
Thanks!
That’s interesting about the special characters. I may have missed something when checking for them, I’ll definitely look into it.
3 deloresdefacto // Nov 10, 2005 at 10:45 am
Thanks! I was trying to use WP Audioscrobbler but it would not work. I’m glad this one does!
4 are You Awake? » Blog Archive » Best Wordpress Plugins // Nov 18, 2005 at 6:11 am
[…] Ajax Spell Checker: Spell checks what you type and spell checks users comments. I wish i could disable the spell checking on users comments, only because it doesn’t look good. akismet: Comment spam remover, works very well. EZ-WP-Scrobbler: Displays a list of songs that i have listened to in itunes. Very customizable and very easy. Falbum: mobloging at its finest. The ability to show flickr pictures in wordpress. Integrates very well into wordpress templates. Google Analytics: Plugin that inserts the google anaytic code to show on all wordpress pages. Best stat program ever. Mindpress: Cross post plugin for mindpress.net. Mypress: Cross post plugin for myspace.com. Feedburner Feed Replacement: replaces your feed links to feedburner links. Where you can get more stats in who is looking at your feeds. Google Sitemaps: Helps google understand what your site is about. And can incresae your page rankings. WordPress Database Backup: Because you never know when your database will go down. Get a backup of it, just in case. WPG2: Integerates the gallery into wordpress. I don’t use it very often, but its just good to have just in case. Since now i am using flickr a little bit more. WP-iCal: Integrates your posts into ical events that users can sunbscribe to. Works very well, and i like it a lot. […]
5 Trev // Nov 18, 2005 at 10:27 am
Thanks. Seems to be working - at least I think it will be when LastFM starts working again. Tried a few others and no success and this one seems to have been a breeze!
6 brink // Nov 18, 2005 at 10:12 pm
Yeah, that’s the one downside to this plugin: it relies on an external service. Last.fm has not been accepting submissions off and on for the past few weeks. It’s really irritating.
7 Toni // Nov 19, 2005 at 6:31 pm
Thanks for the great plugin.
I couldn’t get the options page in the admin panel to open. (cannot create class…etc. error). I did go through all the troubleshooting tips above and couldn’t fix the prob. So, I just as easily went and edited the option by hand in the code. Works great.
8 Laundro // Nov 20, 2005 at 10:35 am
Installed just as planned with your easy instructions!
Worked great…
Have you thought about AJAX for updating?
Thanks!
9 laurie // Nov 20, 2005 at 11:42 am
great plugin! thanks. I have one question though, why does the date display show as (Dec 31, 6:59 pm) for every song played? Is there a way to fix this?
10 brink // Nov 20, 2005 at 12:03 pm
laurie: Hey, sorry about the date thing. I’d thought I’d caught that bug before people had downloaded
See the note at the top of the screen.
Laundro: Shhhh… ajax is in the works for V1.5
11 Laundro // Nov 21, 2005 at 8:37 am
Most excellent.
Let me know if you need testers…
12 Josh // Nov 21, 2005 at 12:32 pm
I couldn’t get the options to show either, but I edited them by hand and all seems to be working fine. Permissions seem to be set correctly according to your guide.
13 brink // Nov 22, 2005 at 11:32 pm
Many thanks to Josh for troubleshooting the “could not create class” bug. It was a little boneheaded — basically it was set so that only the blog Administrator user could use the options page. So, you’d only see the bug if you created a new, non-admin user for your posting needs.
The plugin has now been updated to a more realistic permission level. If you don’t want to download the latest version and are feeling frisky, you can manually do the fix yourself by opening the ez-wp-scrobbler.php file in your plugins directory, going down to line 139 (try doing a search for “add_options_page”), and changing the 10 to an 8 in the line that says
add_options_page('EZ Scrobbler', 'EZ Scrobbler Settings', 10, basename(__FILE__), 'scrobbler_admin_panel');
Save and you’re good to go.
14 La Bella // Nov 30, 2005 at 1:31 pm
I’ve installed this plugin!
Loveeeeeee it!
I had another plugin installed but I like this one much much btter!
Thanks for creating it and sharing it with us.
Just one question, I’m trying to add an image where it gives you the option to, but everytime I put the path, it disappears when I save it…
Any idea why this could be happening?
Thanks for your help in advance!
15 Kevin // Dec 3, 2005 at 7:14 pm
Great plugin. Of the many I’ve tried, this one works the best for my site. Thanks!
One question: where can I change how the songs are displayed? I want to at least have a line break between each song, possibly make a hanging indent, but I couldn’t find where to do that in the php files. I did find where to set the links to go to new windows, though, which I find immensely useful.
16 brink // Dec 7, 2005 at 12:34 pm
Kevin: Perhaps the easiest way to accomplish this would be to set P as your wrapper tags in the admin.
La Bella: I’m still looking into this. But the short answer is that internally I do a check to see if the file exists or not to prevent misformatting. Apparently my logic isn’t as robust as it could be :/
17 Enki // Dec 8, 2005 at 5:22 am
Hey, theres another plugin for this task and it uses AJAX, check it out: http://leflo.de/projekte/scrobbler
18 GreyDuck // Jan 5, 2006 at 7:09 pm
I tried a couple of the other similar-feature plugins, one of which tried to break my site. (Argh.) This is the one I’m sticking with. Thank you so much!
(It didn’t work at first, but I got it working as soon as I stuck the “do_footer” thing in the #footer section of my one-document template. *cough* That’s me, reading the fine manual…)
19 greyduck.net » Striking A Balance Betwixt Old And New // Jan 5, 2006 at 7:42 pm
[…] As I indicated yesterday, however, a considerable motivation for making the platform change was the ability to do fun and interesting new things with the website without actually becoming a programmer. To this end I’ve installed a few Wordpress plugins which you can see and enjoy on the new Status page. I found the myStatus plugin while looking for examples of how WP’s standalone Pages feature works, and that led me to the incredibly-cool plugin modestly named “The Execution of All Things” as well as to a succession of last.fm plugins, one of which tried to break my site (fortunately EZ-Scrobbler works like a charm). […]
20 Allen // Jan 8, 2006 at 4:56 pm
Thanks for the great plugin!
This is what my ideal configuration looks like, which is possible with the WP Audioscrobbler plugin. I would love it if your plugin could do that! I don’t like to use WP-Audioscrobbler because it makes my blog go down when Last.fm is down.
Also, when Last.fm is down, the plugin will just show an endless loading image. Is it possible for you to display a message like “Could not retrieve your data.”?
A bug I’ve noticed is that you have the height and width of the loading image defined in one of the files. This causes a problem if one sets a loading icon different than the one you have. The image will be stretched.
21 Oerjan // Jan 20, 2006 at 9:50 am
Hello.
I can’t get this plugin to work for me. And I don’t know why. I have add the following code at the and in the footer.php (Using WP-defult theme) (No linebreaks) I add it after But I have tried to add it just before it. No change.
In my sidebar.php I add it just like this:
(no linebreaks)
The EZ-scrobbler folder and all the files I give the permission 777. When I tried som other permissions WP crashed.
22 Oerjan // Jan 20, 2006 at 9:52 am
?php get_scrobbler(); ?
(with a last)
?php do_action(’wp_footer’); ?
(same here)
23 sheepeatingtaz » Blog Archive » Audioscrobbler // Jan 25, 2006 at 5:30 am
[…] I’ve added a new plugin to the blog, if you look in the sidebar, It now displays the last few tracks I’ve played on my PC. I tried to use the scrobbler plugin, which is full of AJAXy goodness and auto-refreshes, but because of the way PHP is set up by dreamhosts (and I can’t change it) It doesn’t work. Apparently I need to enable “URL file-access”, and dreamhosts won’t let me. They suggest that I modify the plugin to use CURL instead, but I don’t have the time to work out how to do that so I’ve opted for ez-scrobbler, which does the same, but without the auto-refresh (as far as I can tell). […]
24 joe // Jan 25, 2006 at 3:31 pm
the plugin is awesome.. i’m having one problem though.. seems to show perfect in firefox, but not in IE as some people have informed me.. and upon checking it myself it doesn’t show at all..
is there anything i’m doing wrong or a way to fix it.
25 ArchY // Jan 29, 2006 at 5:29 pm
I have added this plugin thx !
It works great !
Just have to read everything to chmod correctly and everything is fine
26 Camp // Feb 7, 2006 at 2:21 pm
Thank you for sharing this plug-in. It’s much easier for newbies like me to set up!
Can I make a suggestion? I don’t even know if this is possible…
You know how LastFM resets the “recently played” list after a (fairly short) period of time? As you know, that leaves a wasted spot in the sidebar if I’m not currently listening to music. It just looks bare without any music listed.
Would it be possible for the plug-in to “remember” the last few tracks and keep them displayed on my site? That way, even if I haven’t listened to music in several hours (or if LastFM is down) it still shows the last tracks?
Just curious if that’s even possible as not all visitors to my site are necessarily visiting while the plug-in is active.
Thanks!
27 Steff // Jun 16, 2006 at 1:16 am
I love this plugin and it’s the only one thats worked for me, but theres one problem. i have it in my sidebar, and right above it, i have an h3 tag with ‘recent tracks’ in it. but between the songs and the h3, theres this huuuuge gap. i’ve tried looking at the coding and i… just got a headache haha. any help would be appreciated, thanks!
28 Anders // Jul 3, 2006 at 6:52 am
Just a quick note in case anyone running PHP on IIS in CGI mode should think about this. The script ez-wp-scrobbler.php fails cause $_SERVER[’REQUEST_URI’] isn’t defined in CGI mode. Inserting this into line 65 (or somewhere nearby) fixed it for me:
if( empty( $_SERVER[’REQUEST_URI’] ) ){ $_SERVER[’REQUEST_URI’] = $_SERVER[’PHP_SELF’].( ( !empty( $_SERVER[’QUERY_STRING’] ) ) ? ‘?’.$_SERVER[’QUERY_STRING’] : ” ); }
29 Julia // Aug 2, 2006 at 4:40 am
Hmm, I get a very strange error message after activating your plugin:
Fatal error: Cannot instantiate non-existent class: ez_scrobbler in […]/wp-content/plugins/ez-wp-scrobbler.php on line 72
Any ideas on why that happened? I have done nothing but upload the files and (try to) activate the plugin.
I would really like to use your plugin since it seems to have everything I am looking for.
30 brink // Aug 2, 2006 at 7:44 am
I am looking into this. Do you have the folder called ez-scrobbler-files in addition to the ez-wp-scrobbler.php file in your plugins directory? Were the permissions okay? Off the top of my head those are the only things I can think of that might be causing problems.
31 Julia // Aug 5, 2006 at 6:30 am
It must have been the server. I changed it and now it works like a charm.
A huge thank you for your efforts
32 jessica // Aug 20, 2006 at 8:04 pm
I have the plugin up and running, unfortunately it won’t stop showing someone else’s (RJ’s) recent tracks, and it won’t show mine. The profile link, and weekly and top links work correctly and display my last.fm info, but for some reason recent tracks just keeps RJ’s info. Any ideas?
33 milo317 // Aug 21, 2006 at 7:14 pm
Great plugin, tried several others, none of them worked properly at my second page.
Thank you for sharing.
34 Keng // Aug 25, 2006 at 6:21 pm
The following shows up on my WP admin page whenever I try to edit the EZ Scrobbler settings to what I want:
Warning: fopen(/home/tgeek/public_html/domain/blog/wp-content/plugins/ez-scrobbler-files/ez-scrob-settings.ini.php): failed to open stream: Permission denied in /home/tgeek/public_html/domain/blog/wp-content/plugins/ez-wp-scrobbler.php on line 234
No settings were changed because there was a problem with one of your entries:
* Could not open settings file for writing. Please check permissions on /home/tgeek/public_html/domain/blog/wp-content/plugins/ez-scrobbler-files/ez-scrob-settings.ini.php
I tried CHMODing the files (the ez-scrobbler-files directory was the same as yours) to what you showed in the ‘What to do in case of problems’ part, but it still refuses to work. Any ideas on how to fix this? ‘Cause I’ve run out. :/
35 brink // Aug 25, 2006 at 7:55 pm
Jessica: I’ve been having a problem with that recently, too… it’s off and on so I think it may be last.fm related. For like three days it kept showing RJ (which is the last.fm test user) for my data. The only thing I can think to try would be renaming the cache file, “scrobbler.rdf”
Keng: It sounds like your webserver is having problems writing modifying the file for you. You could try making Group writable (rwxrwxr-x), perhaps. If that doesn’t turn the trick, my plugin may not work on your web host
The new version I’m working on will store all that stuff in the database, so that will solve the permissions problems if this is the case for you.
Leave a Comment