Filzhut.net Filzhut.net amazon_functions for PHP (Version 0.9)
Making the work with Amazon.com™ Web Services Version 1.0 much easier

Some vars...

To get startet you just need to set some vars in the file "amazon_functions.php". Open the file and set the constant DEVTOKEN with the developers token you obtained from amazon™ (learn here how to get one). The second constant ASSOCIATESID is optional - if you have one, you can set your associates-id here. In this case the product-links returned by amazon and shopping-cart-buttons already contain your id (please check this with a little test).
If you want to change the caching-settings feel free to change the directory for caching (AMAZONCACHEDIR) and the time after which the files will be reloaded (AMAZONCACHEMAXTIME). This time is set in seconds, so if you want to let the files be cached for one day (default), it is "86400". IMPORTANT: The remote file permission for the directory you choose to cache has to be in "write" mode.

Example 1. Setup your token & id:

define ("DEVTOKEN", "YOUR_TOKEN_HERE");
define ("ASSOCIATESID", "YOUR_ASSOCIATES_ID_HERE");
define ("AMAZONCACHEDIR", "functions/cache/");
define ("AMAZONCACHEMAXTIME", "86400");		# In seconds, 86400=one day


© by Filzhut.net, Daniel Filzhut 2002