last.fm

You know you don't wanna update RPoL when...

...you decide to code a bit of (not terribly well-written) php to access the last.fm API and print a "most recent track played" link in text on your current status block (see above). :P

I realized it's easy enough with the API being open to users who sign up and get an API key. This is the function being used, which fetches the most recent tracks played by a specific user. I just specified my own user name, limit = 1 for one track and the key I signed up for here.

Pretty easy stuff, didn't take me long after I poked around at the PHP XML parser documentation. Right now I'm using xml_parse_into_struct with a switch nested in a foreach (with a shortcut break as soon as I get all the info needed), but there's likely a cleaner way to do it than that. For now, it works, so I'll use it. :P I'd been wanting to have a self-updating "currently listening" app for a while now.

Still, took time I could've been writing rpol posts for. I'm going to seriously regret the time lost. :/ I'm incredibly sleepy. However I am going to upload some new, smaller gif versions of the Dark Siren and Ryshy chibis by shurelia. Woo. (Edit: All done, saved nearly 60kb in all!)

Chibi Ryshassa by shurelia @ deviantart!

darksiren's domaine has been the personal domain and weblog of the Dark Siren Sally (Scylla Opal) since 2001.

I don't know what else to put in this box yet. So Ryshy says hi! :)

Syndicate content