如何通过亚马逊API获取书籍封面图片

时间:2009-05-18 08:48:40

标签: amazon-product-api

我希望通过Amazon API获得一本书的封面。我使用ItemLookup函数,但我只获得authormanufacturertitle

即:

<ItemAttributes>
<Author>Anna Gavalda</Author>
<Manufacturer>J'Ai Lu</Manufacturer>
<ProductGroup>Book</ProductGroup>
<Title>Ensemble, C'Est Tout (French Edition)</Title>
</ItemAttributes>

2 个答案:

答案 0 :(得分:3)

答案 1 :(得分:0)

你可以试试这个:

$track=$_GET['title'];

// Call To Amazon Predefined Class
$client = new AmazonECS(AWS_API_KEY, AWS_API_SECRET_KEY, 'com', AWS_ASSOCIATE_TAG);
$response = $client->category('Books')->responseGroup('Images,Reviews,ItemAttributes,OfferSummary')->search($track);

// To Get Image
<img src="<?php echo $response->Items->Item[0]->LargeImage->URL ?>" width="233" height="300">