set_time_limit(0); require("./AmazonSearch.php"); $ASIN1 = '0201896850'; $Tag = 'mappointresou-20'; $Token = 'D1KJZMWYGBWMNG'; $AS = new AmazonSearch($Token, $Tag, $Debug); $Result = $AS->DoASINSearch($ASIN1, 'heavy', 'electronics'); if ($Result !== null) { for ($i = 0; $i < count($Result); $i++) { $ResultRow = $Result[$i]; // print_r($ResultRow); /* * Extract fields of interest. * Note: There are many more fields than are shown here. */ $ASIN = $ResultRow['Asin']; $Url = $ResultRow['Url']; $ProductName = $ResultRow['ProductName']; $Catalog = $ResultRow['Catalog']; $Manufacturer = $ResultRow['Manufacturer']; $UPC = $ResultRow['Upc']; $ListPrice = $ResultRow['ListPrice']; $OurPrice = $ResultRow['OurPrice']; $UsedPrice = $ResultRow['UsedPrice']; $Media = $ResultRow['Media']; $Availability = $ResultRow['Availability']; $ReleaseDate = $ResultRow['ReleaseDate']; $ImageUrlMedium = $ResultRow['ImageUrlMedium']; $ImageUrlLarge = $ResultRow['ImageUrlLarge']; $Authors = $ResultRow['Authors']; $Reviews = $ResultRow['Reviews']; //$Lists = $ResultRow['Lists']; echo "
".$ProductName.""; echo "
Release Date: ".$ReleaseDate.""; echo "
Low Amazon Price: ".$Price.""; for ($j = 0; $j < count($Authors); $j++) { $Author = $Authors[$j]; echo "
Author: ".$Author.""; } echo "
Availability: ".$Availability.""; echo "
Media: ".$Media.""; //while( list($key, $value) = each($Reviews) ) //{ // echo "
[$key] $value"; //} echo "
Comments:"; $CustomerReviews = $Reviews['CustomerReviews']; for ($j = 0; $j < count($CustomerReviews); $j++) { $Comment = $CustomerReviews[$j]['Comment']; $Summary = $CustomerReviews[$j]['Summary']; echo "
".$Summary."";
echo "
".$Comment."";
}
//for ($j = 0; $j < count($Lists); $j++)
//{
// $ListId = $Lists[$j];
// echo "
".$ListId.""; //} } } else { print(" Search failed.\n"); } print("\n"); ?>