Play Last.fm Radio Streams in your Music Player - gHacks Tech News

Play Last.fm Radio Streams in your Music Player

Last.fm does not offer an obvious option to play music streams in an external music player. It is however possible to obtain the stream url for several radio streams from last.fm and use them in your favorite music player. This is also an excellent opportunity to record those songs using that player. I do recommend XMPlay for this.

You need to do the following to obtain the stream information: The first step would be to compute the MD5 sum of your password. You can do that at rednoize for example. Once you got that information you copy and paste the following url into your browser, edit the two variables username and password and hit enter. (one line of course)

http://ws.audioscrobbler.com/radio/handshake.php?version=1.1.1&
platform=linux&username=
&passwordmd5=&debug=0&partner=

Replace with the username and with the md5 sum of your password that you got from rednoize.

The important part of the few lines of text that appear is the one beginning with session=

Remember that part and go to the last.fm homepage. What you need to do know is to seek for something that you want to listen to. We need to create a last.fm:// url that we need later to tune in. Some examples:

lastfm://artist/
lastfm://artist//similarartists
lastfm://globaltags/
lastfm://user/username

You can basically just add an artistname, tag or username to that url. To tune in we need to open another url that looks like this:

http://ws.audioscrobbler.com/radio/adjust.php?session=&
url=&debug=0"

The SessionID is the one that you got from the first url while the last.fm URL is the one that you got from the above examples. A valid one would look like this:

http://ws.audioscrobbler.com/radio/adjust.php?session=&
url=lastfm://artist/Bridge+to+Solace&debug=0

If the response is ok the text in the browser will say so otherwise it will say failed.

Open your favorite music player and open the url http://87.117.229.85:80/last.mp3?Session= to tune in. It should load and play fine if the response from the browser was ok.

To sum it up again:

1. Go to Rednoize and look up your mp5 sum of your password
2. Open http://ws.audioscrobbler.com/radio/handshake.php?version=1.1.1&
platform=linux&username=&
passwordmd5=&debug=0&partner= and replace the username and md5sum with the correct values
3. Create a last.fm:// url
4. Open http://ws.audioscrobbler.com/radio/adjust.php?session=&
url=&debug=0
5. If the response is ok load the stream url from the first browser response in your music player.

Read More:

Rednoize
via Gabistapler.de

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:

Comments

  1. HED854 said on September 23, 2007 at 5:53 pm
    Reply

    Wow thankx to share this nice tip ! I have to try this !

  2. Dananjay Anandan said on January 3, 2008 at 11:20 pm
    Reply

    hi! thanks for sharing. this works great now! trying to make it work with a barebones swf mp3 player off a server with php. :)

  3. Dananjay Anandan said on January 4, 2008 at 7:03 pm
    Reply

    heh…this is fun, i can just set the radio to my favourite station and then use the stream url in my download app to save the stream into a nice fat mp3 on my harddisk. :)

  4. Mads said on April 22, 2008 at 2:13 pm
    Reply

    Thanks a lot for this… I adapted it into a shell script and now any last.fm artist is only a single command away :)

  5. Derjyn said on May 31, 2009 at 3:33 am
    Reply

    Rednoize is gone, and using other md5 converters, doesn’t work. The error returned upon creating that url using the username/converted password is:

    session=FAILED
    msg=padd md5 not 32 len

    So, this is tutorial is sorta bunk/outdated now. Any chance we can get a new working version?

  6. Derjyn said on May 31, 2009 at 3:45 am
    Reply

    Sorry, disregard my last post… I was replacing the password in the url, not appending it, heh.

  7. john said on June 23, 2009 at 1:20 am
    Reply

    Hello,

    thanks for the very useful post.

    I would like to know if you know how to recover the stream of a specific song, such as the one in this URL:

    http://www.last.fm/music/The+Fray/_/How+to+Save+a+Life

    Thanks

  8. Physatty said on February 17, 2011 at 7:28 pm
    Reply

    Hey,
    does it still work? I tried it and my music player could’nt find the stream. Maybe I made a mistake but I don’t know!?

    1. Tricky said on May 1, 2011 at 5:45 pm
      Reply

      I dont think it still works cuz I tried myself and found out that the link ‘http://ws.audioscrobbler.com/radio[…]’ is dead…this is step 2 u c?!

      so frustrating but thats life: hard and unfair! innit???

      if u want to listen to last.fm without starting your browser download the scrobbler http://www.lastfm.de/download

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.