So your script can only be used if you have a local php server? Do you need to download the discogs data first?
Have you seen that discogs has a new API (v2.0) and the old one will be shut down in December?
/t/12508/1
http://blog.discogs.com/2011/06/api-v20.html
I hope that doesn't affect you script.