PHP Classes

Album Art Downloader: Retrieve music album images from

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Info   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2015-07-20 (6 months ago) RSS 2.0 feedNot enough user ratingsTotal: 1,945 All time: 1,934 This week: 1,119Up
Version License PHP version Categories  
album_art_downloader 1.2GNU General Publi...4.0Databases, Graphics, Content management, W...
Description Author  

This class can be used to retrieve music album images from site.

It accesses Web services API server and retrieves the URL of music album images.

The class also retrieves the image files into a local server directory and stores the image file names in a MySQL database.

Picture of Nadir Latif
  Performance   Level  
Name: Nadir Latif is available for providing paid consulting. Contact Nadir Latif .
Classes: 17 packages by
Country: Pakistan Pakistan
Age: 32
All time rank: 791 in Pakistan Pakistan
Week rank: 9 Up1 in Pakistan Pakistan Equal
Innovation award
Innovation award
Nominee: 10x

Winner: 1x

Made by: Nadir Latif (

Dependencies: mp3management (

This script can be used to download album art from

1) Usage:

-Enter database configuration settings in the database is created using mp3management script.
-Set the variable $path_symbol to "/" if running on linux or "\" if running on windows.
-Enter email of user in set_error_handling.php. All php errors except for notices will be sent to this email address.
-Set the variable $album_art_folder to the location of the album art folder. The downloaded album art images will be saved to this folder.
-To run the script directly from the browser instead of as a background task, set $is_debug variable to 1 and comment line 4. This will display error messages on screen instead of emailing the error.
-Get your amazon webservices id and secret key and enter them on the following lines in get_album_art.php :

define("Access_Key_ID", "Access_Key_ID");
define("Associate_tag", "Associate_tag"); 
define("Amazon_secret_key", "Amazon_secret_key");

-Copy the files to the directory of a web server and run index.php.

2) What does this sctipt do?

The script retrieves rows from a table that contains mp3 meta data such as album,album art,artist etc. Only rows that have album and artist but no album art are retrieved. For each row the script uses the album and artist names to retrieve the album art. The album art image is saved to a folder and the name of the image is saved in the database. The script makes a maximum of one request per second in accordance with the web service usage policy of This script can be used with mp3management script written by myself. The mp3management script retrieves album art from meta tags. For those mp3s that do not have embedded album art, this script can be used to download the album art. The script uses a custom error handler for reporting errors, which emails errors to the user. This is suitable if the script is to be run as a background task or as a cron job.

3)List of files:

a)index.php (initial file)
b)get_album_art.php (main program file)
c) (database configuration file)
d)set_error_handling.php (used to set the error handler to a user defined function)
e)readme.txt (help file)

-Feel free to contact me for any assistance regarding this script.
  Files folder image Files  
File Role Description
Accessible without login Plain text file Conf. database configuration file
Plain text file get_album_art.php Class main program file
Accessible without login Plain text file index.php Example initial file
Plain text file set_error_handling.php Class used to set the error handler to a user defined function
Accessible without login Plain text file readme.txt Doc. help file
Accessible without login Plain text file LICENSE.txt Doc. Documentation

 Version Control Unique User Downloads Download Rankings  
 100%Total:1,945All time:1,934
 This week:0This week:1,119Up