Enter your Last.fm username and password on the handshake page - this requires a certain amount of trust, sure… but you can see exactly what the code is doing, and if you know me, you’ll know I’m hardly competent enough to bother storing your credentials. You’ll be taken to a URL beginning http://post.audioscrobbler.com/ which should have 4 lines, the first being “OK”. On the second line, there’s an authentication token that you’ll need to submit tracks.
On the submit page, enter the authentication token in the first box, followed by the song information. The timestamp is given at the top (I’m sure there’s an easy way to copy that into the field, but I haven’t figured it out yet). Source should be “P” and all the other boxes should be played with carefully, unless you bother reading the documentation. The result should be a simple “OK”.
The client this submits as is set to “tst”, but as “client authors should use the tst identifier for clients which are not publicly distributed” please don’t go messing with it too much. This was just meant to be a fun project.
By adam2z on 26 May 2008 at 23:20:
cool stuff :)
By Will Morgan on 18 November 2008 at 21:22:
I suppose with this example you could go on and solve the problem that Last.fm has with scrobbling tracks that one might watch on YouTube or discover on MySpace. Maybe a bit of Greasemonkey would be needed.
By Alex Muller on 19 November 2008 at 14:07:
Ha, that’s exactly what I was going to move on to create… and I should have something done within a few weeks of spare-time-coding :)