In case anybody is curious, this is what my local homepage (mentioned earlier) looks like. For the moment, I am mirroring it once a minute using a cron job. The nice thing about having a homepage that is advertised using Rendezvous is that you can be pretty sure people are using Safari. It might look strange in other browsers, I don’t know.
This is what I do in AppleScript (which is run periodically by iChatStatus).
For this to work, you need to create a smart playlist with no conditions, and Limit to 7 songs selected by most recently played – and name it “Last Played”.
Edit your /etc/httpd/users/yourname.conf and set AllowOverride to All (or at least not None). Then create a .htaccess file in your Sites folder, containing the following:
AddType text/html .shtml
AddHandler server-parsed .shtml
Options +Includes
DirectoryIndex index.shtml
Create index.shtml (in your Sites folder) and do a <!--#include file="iTunes.inc" --> in it.