Muschamp Rd

Creating an album cover gallery

September 28th, 2010
PHP logo

After my epic and still ongoing battle with PHP and WordPress I decided that I might as well do something at least a little unique and creative with PHP, APIs, RSS, and whatever else. I keep tweaking my sidebar, despite an obvious bug in the WordPress main codebase, I added some more Web 2.0-esque features to formerly static pages on and while doing this and the whole hoopla over Apple’s ping social network I decided to do something with my music collection.

Update: I ended up making more than just a simple album cover gallery, and it is still an idea I may revisit, so I included a screenshot of one of my later versions. Code to make a gallery like this from your own music collection is available as open source. Alas it is almost a decade later and many APIs and this code no longer work as well as pictured below. I may fix it, but it may be unfixable and finding a new job is my priority.

CD Cover Gallery example
I previously wrote how I entered a lot of books I’ve read into Goodreads and now can manipulate that data in a Web 2.0 way. Well after my friend’s house got broken into and his CD collection was robbed I’ve been keeping a list of every CD I own online because if you have such a list and the correct insurance policy, you get your entire collection replaced, not just 50 random CDs or whatever the policy defaults too. In addition to CDs, at some point I typed out a list of my old cassette tapes, even LPs and 45s.

This was all fine and dandy in the Web 1.0 world, but in 2010 you have to do something cool with your data, so I thought why not use to display the album covers rather than just list what albums I’ve collected over the years? Alas the API doesn’t really support this, so after much Googling I learned I could do this with the Amazon Product Advertising API, alas it has undergone changes and may not be so feasible anymore.

Due to its omnipresence I was forced to use PHP, so you’d think with PHP and the Amazon API and a Bachelors Degree in Computer Science this would be easy, well it wasn’t. Amazon isn’t so interested in their Product Advertising API anymore, they’re more interested in promoting their other web services. They also upped the complexity of the requests which was maybe too much for some PHP coders. Luckily not all PHP coders are created equal and I finally found someone with a working example that I could adapt how I wanted in a couple hours. Other “APIs” I tried were even buggier and frustrating to work with.

Sameer Borate seems to get Object Oriented Development, PHP, and writing sensible, reuse-able (by others) code. He might have even made unit tests which would make my old mentor proud. The other hero of the PHP Amazon API world is named Ulrich Mierendorff most everyone seems to use his aws_signed_request.php function. I however use Sameer’s slightly modified version as my webhost doesn’t like calls to file_get_contents() among many things restricted in the PHP installation.

My old code and examples are no longer working, Amazon may have finally restricted or removed my access to their API. I know Amazon’s and many other APIs update and require you update your code but I just did not have the time, especially while living in China and spending so many years studying for the CFA® exams. I passed them all but like PHP I have not profited at all, I am unemployed. So if you have any advice on using PHP and APIs or on how to find a job you can leave them below.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Posts on Muskblog © Andrew "Muskie" McKay.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Muskblog. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.