I use the RSS feed of my recent tracks combined with the free http://feeddigest.com service. You can see it on my page at http://myvogonpoetry.com in the right-hand column - it is titled "Recent Tunes"

UPDATE: I have removed this from m site and have replaced it with the last.fm widget. It is updated almost immediately. This way still works though.

http://feeddigest.com does all the work. Sign up for a free http://feeddigest.com account and give it your RSS feed URL: (mine is http://ws.audioscrobbler.com/1.0/user/brianpipa/recenttracks.rss)

use a template they have or use a custom one - I use this as my template:

<li class="music">
    <a href="%URL%">%DESCRIPTION,25%</a>
</li>

so for every entry, it creates it as an li element of class "music" - it will link to the AS page for that song, it will use the description as the text on the webpage, and it will cut it off at 25 characters.

Once you create it in feed digest, you click on the "get the code" link and you put the code in your sidebar. Since I am running Wordpress, I use the PHP code like this:

<?php
include ("http://app.feeddigest.com/digest3/4J2AUPCK1S.html");
?>

but it also supports including it via Javascript.

(optional) To get the little speaker icon thingies, my stylesheet has a li.music entry in it to put the audio.gif in front of each entry. The stylesheet entry looks like this:

li.music {    list-style-image:url(http://www.myvogonpoetry.com/images/audio.gif);
}

Do NOT use the image straight from my site. Put it on your own site. If you use it directly from my site, I could at any time switch the image to something you may not like.

One other nice feature about Feeddigest.com is that it caches the RSS so if you go for a while without playing songs it will still show the last data it had - so you never get any empty lists.

Brian http://myvogonpoetry.com

EDIT: It should be noted that Feed Digest does not update immediately, but rather every 15-30 minutes, so the list on your site will not be a real-time list, but rather a list of "Recent Tracks" not a list of "The Stuff I JUST Listened To".