0

Hi,

I'm trying to use Zen_Service_Amazon api but I have a problem.
When I try to run this code on localhost:

<?php

require_once 'Amazon.php';

//i've gor api key and secret key from my aws account

$amazon = new Zend_Service_Amazon($api_key, 'US', $secret_key);

$results = $amazon->itemSearch(array(
'SearchIndex' => 'Books',
'Keywords' => 'php',
'AssociateTag' => 'YOUR_ASSOC_TAG_HERE',
));

foreach ($results as $result) {
    echo $result->Title . '<br />';
}


?>

it shows me 2 warnings:

Warning: gzinflate() [function.gzinflate]: data error in C:\xampp\php\ZendFramework\library\Zend\Http\Response.php on line 612

Warning: DOMDocument::loadXML() [domdocument.loadxml]: Empty string supplied as input in C:\xampp\htdocs\zend_amazon\Amazon.php on line 130

I read the documentation and tutorials about zend amazon service but I didn't find response to my problem.

Is there anyone who know what could be a problem and how to slove it?

Thanks in advance,

Amer

2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by pzuurveen
0

i dont know the amazon api but this doesn't look right to me

'AssociateTag' => 'YOUR_ASSOC_TAG_HERE',

looks like you need to suply a AssociateTag

0

Thanks for the answer.
I read somewhere that associate tag parameter is optional and I tried
without this parameter and it shows me the same error.
How can I get this parameter?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.