Script: links to allmusic.com (PHP)

domesticat's picture

This code has been updated. See this entry for the newest version.

I’ve been on a bit of a PHP coding binge today. Some of you might find this useful, some not. I use DoSomething, a plugin for winamp, to put a file on my webserver containing information on my current playlist. For a while, I used some PHP goodness to create an “I’m Feeling Lucky” google search based off of the author, but then google changed some of their code and I decided to just scrap the feature altogether.Then Brad wrote a similar little tidbit, except that it interfaced with allmusic.com’s database. I liked it. I had to have it. (Greedy, greedy domesticat!) But Brad and I did things a bit differently. My output file from DoSomething is a little .php file that does nothing but declare variables like artist_one and song_one. I then require() that file in all my pages, so that each skin can display the songlist in whatever fashion I’ve decided is best.

(Example: skin#11, ‘twenty-one,’ only displays two songs; the others display five.)

This tidbit changes an artist’s name into the format that the allmusic database is expecting, and also drops an apostrophe-escaped (and, thus, javascript-safe) version of the artist’s name into the bottom status bar. I didn’t really care for the raw allmusic.com search URL, and I thought having something a little cleaner would be nice.

gfmorris's picture

I just wish MMJB would output stuff like this. I just don't like WinAmp. :)

Post new comment

User login

Recent comments

  • Anonymous 5 days 6 hours ago [view]
  • albert (spain) 3 weeks 5 days ago [view]
  • Kelly | Mens Suits 4 weeks 2 days ago [view]
  • Anonymous 5 weeks 1 hour ago [view]
  • Suzanne Nelson 5 weeks 3 days ago [view]

Search

Hello, anonymous!

If you're seeing this, you're not logged in. A lot of content here is only visible if you're logged in, and comments by anonymous users are held for moderation. Consider getting an account to save yourself some frustration?

domesticat.net

is the home of Amy Qualls-McClure since 2000. She is a Drupal / quilt geek in Huntsville, Alabama. One spouse, two cats, no kids, lots of opinions.

Public account for work and Drupal stuff: Private account for friends and personal life:

me on plurk me on drupal.org my music habits on last.fm my photos on flickr my bookmarks on del.icio.us my bookmarks on pinboard.in Amy Q. on foursquare what I'm reading

Some content is locked. Copy these links AFTER logging in for a query string giving you full feed-reader access:

Atom feed, entries RSS feed, entries RSS feed, comments