Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Howtos Associate Tags

loguntsov edited this page · 5 revisions

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;
Something went wrong with that request. Please try again.