PHP Library For Convio Open API

If any of you out there use Convio for your non-profit’s on-line presence, ie website, donations, email campaigns, I’ve created a PHP library for connecting to their Open API.

Convio Logo

I say it’s a “Library”… it’s really just a single wrapper file that aids in connecting to, making call to, and handling responses from, the Convio Open APIs.

There’s no documentation to speak of, but the two files included in the zip archive are pretty solidly commented, so you will probably be able to get a lot from them. The two files included in the zip are the library file itself and an example of how to implement it.

If you end up using it, let me know what you think!

Download the PHP Library for Convio Open API

Last.FM PHP Image Screen Scraper

I’m pretty avid user of Last.FM. I’m not big on this social networking fad, even if I do work in the industry, but I’ve found Last.FM very useful, mainly for finding new music. I’m currently building a web-based media manger in PHP and wanted a way to automatically get images for the artists.

I originally used the discogs.com API and although it was pretty easy to use and reasonably comprehensive, I was really disappointed in the quality of the images, not to mention I was constantly getting back images of electronic and ambient artists who had names similar to the rock bands in my collection, rather than the rock band themselves. I’m sorry, but when make a call to get images for “Cream” I don’t expect to get back some 14-year-old kid with a turntable and a DAT machine; I want freaking Clapton, Bruce, and Baker.

So, discogs.com left me a bit cold. But I soon learned about Last.FM and was delighted when I discovered their API. The image quality at Last.FM is superb, so I knew I wouldn’t be disappointed there. I started researching their API and realized that they didn’t really give me any info I needed other than the images and I didn’t want to have to sign up for an API key if all I wanted to do was download pictures of bands. Also, they only appear to provide three sizes of images and for many bands they have a whole slew of images available: large, medium, small, smaller, square; I wanted them all, not just the three provided by their API.

So, in the end I decided not to sign up for a Last.FM API key and instead wrote a very simple little PHP screen scraper that would bring back all of the images I wanted. Last.FM actually aided me in my goal by embedding a JSON string with just exactly what I needed right onto the artist page. It worked very well, so I decided to stick with it.

You can download my simple screen scraper script here. The zip file includes the class file and an example file.

It’ an incredibly simple script. Just a basic class file with only one useable method. It’s written so it can be expanded, but as Last.FM’s API is under constant development, it probably won’t be. But if you just want a simple script to grab artist images from Last.FM, please download my script and let me know if you like it.