<?
require_once("Services/Amazon.php");

/*
$amazonObj = & new Services_Amazon();
$amazonObj->setToken( "D2VYI4VITRQ9S6" ); // developer tokenは別途入手が必要
$amazonObj->setAssociateID( "zubapitacom-22" ); // アソシエイトＩＤ

$itemlist = $amazonObj->searchKeyword( "amazon" );

print_r( $itemlist );
*/

$amazon =& new Services_Amazon('D2VYI4VITRQ9S6', 'zubapitacom-22', 'jp', 'http://xml.amazon.co.jp/onca/xml2');
//$product = $amazon->searchAsin('4774121738');
$mode = $modeArray['books'];
$product = $amazon->searchKeyword( "amazon" ,$mode);
mb_convert_variables('EUC-JP','auto',$product);
print_r($product);

/*
header("Content-Type: application/x-javascript");
print("<!--\n");
print('document.write("<span id=\"komono_book\">'.$product[0]["name"].'</span>");');
print("\n//-->");
*/


?>