Login   Register  
PHP Classes
elePHPant
Icontem

File: readme.txt

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nadir Latif  >  Album Art Downloader  >  readme.txt  >  Download  
File: readme.txt
Role: Documentation
Content type: text/plain
Description: help file
Class: Album Art Downloader
Retrieve music album images from Amazon.com
Author: By
Last change: -documented how to use script after support for amazon url signing was added.
Date: 5 years ago
Size: 2,305 bytes
 

Contents

Class file image Download
Made by: Nadir Latif (nadir.latif@yahoo.com)

Dependencies: None.

This script can be used to download album art from amazon.com.

1) Usage:

-Enter database configuration settings in config.inc.php.
-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 amazon.com. 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)config.inc.php (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.