function ItemSearch($search_index, $options = array()) { // SearchIndex ではなく Category が渡された if (array_key_exists($search_index, $this->_categoryToSearchIndex)) { $search_index = $this->_categoryToSearchIndex[$search_index]; } $result = parent::ItemSearch($search_index, $options); return $result; }
<?php // 取得したアクセスキーを設定してください。このままでは動作しません。 // アクセスキーID define('ACCESSKEY_ID', 'あなたのアクセスキーID'); // シークレットアクセスキー define('SECRETACCESSKEY', 'あなたのシークレットアクセスキー'); // トラッキングID define('TRACKKING_ID', 'あなたのトラッキングID'); require_once 'Services/Amazon.php'; $amazon = new Services_Amazon(ACCESSKEY_ID, SECRETACCESSKEY, TRACKKING_ID); $amazon->setLocale('JP'); $category = 'Books'; $options['Keywords'] = 'マイナビ'; $options['ResponseGroup'] = 'Images,ItemAttributes'; $result = $amazon->ItemSearch($category, $options); var_dump($result);
<?php // 取得したアクセスキーを設定してください。このままでは動作しません。 // アクセスキーID define('ACCESSKEY_ID', 'あなたのアクセスキーID'); // シークレットアクセスキー define('SECRETACCESSKEY', 'あなたのシークレットアクセスキー'); // トラッキングID define('TRACKKING_ID', 'あなたのトラッキングID'); require_once 'Services/Amazon.php'; $amazon = new Services_Amazon(ACCESSKEY_ID, SECRETACCESSKEY, TRACKKING_ID); $amazon->setLocale('JP'); $amazon->ItemSearch('Books', ['Keywords' => '本']); $xml = $amazon->getRawResult(); print $xml;