First of all instantiate AmazonECS
Note: There is a new parameter at the constructor. You now can pass your associate ID.
If the associateTag is set all requests are signed with this tag.
In the results this tag would be included in the URLs to the ProductPages.
So you don't have to build your own URLs linking to the Amazon Website.
<?php require_once dirname(__FILE__) . '/lib/AmazonECS.class.php'; $amazonEcs = new AmazonECS('API KEY', 'SECRET KEY', 'LANG', 'ASSOCIATE TAG');
The parameter LANG is optional. It could be: de, com, co.uk, ca, fr, co.jp, it, cn, es
The parameter ASSOCIATE TAG is optional.
You can change the associate tag on the fly:
<?php // ... $response = $amazonEcs->category('DVD')->associateTag('XXXX-XXX')->search("Matrix Revolutions");
The same function could be used as a getter for the associateTag:
<?php // ... $currentTag = $amazonEcs->associateTag(); echo $currentTag;