The Learning Curve

New tricks for an old dog.

Amazon ECS Simple Store in PHP

The new XML parsing functions incorporated into PHP version 5 make handling XML data exchanges much more easy. XML is the format used by, eBay, Google, RSS, and many others, so it is worth learning.

The Amazon E-commerce Services developer website offers its Amazon ECS Simple Store in PHP available for free download. It is a single file of 274 lines written in PHP version 5, named SimpleStore.php. It is distributed in a .zip file.

The requirements are a server that offers PHP version 5, an affiliate ID, and an API access key. The Amazon affiliate ID and API access key are each free, quick, and easy to obtain. It is necessary to insert the affiliate ID and the API access key into the SimpleStore.php code, which is a fairly obvious task.

On my web server, which offers both PHP version 4 and PHP version 5, it was necessary for me to rename SimpleStore.php as SimpleStore.php5, and to locate the 5 or 6 references to the file name SimpleStore.php within the code to make a similar change from *.php to *php5.

That’s it.

Here’s what Amazon’s simple store looks like in operation.

Obviously, this is practically useless by itself. It is, however, a very useful first step in learning the basics.


Written by Tom Fox

06/05/2007 at 8:36 am

%d bloggers like this: