As previous post was about fetching covers media from Amazon Web Services, this post will be about fetching covers from popular music site – Last.fm. API documentation page
#!/usr/bin/ruby require 'rubygems' require 'net/http' require 'cgi' require 'xmlsimple' # key from API documentation $lastfm_key = "b25b959554ed76058ac220b7b2e0a026" $lastfm_host = "ws.audioscrobbler.com" def fetch_cover(artist, album) artist = CGI.escape(artist) album = CGI.escape(album) path = "/2.0/?method=album.getinfo&api_key=#{$lastfm_key}&artist=#{artist}&album=#{album}" data = Net::HTTP.get($lastfm_host, path) xml = XmlSimple.xml_in(data) if xml['status'] == 'ok' then album = xml['album'][0] cover = { :small => album['image'][1]['content'], :medium => album['image'][2]['content'], :big => album['image'][3]['content'] } return cover end return nil end puts fetch_cover('Nickelback', 'Dark Horse').inspect
Download ruby script


Nice.
Can you done that in PHP, it will be very useful for me. 
P.S. Strange im using same theme like you
Hey, CappY, here is PHP version for this script: http://files.sosedoff.com/8db65c5c/
But you have to install SimpleXML extension (usually comes by default)
Thanks a lot. That really helped me with my project… Cuz I’m still learning.