amazon_ean_to_asin($ean)Given an EAN (ISBN-13), try to get Amazon to give it to us.
see https://affiliate-program.amazon.com/gp/associates/help/t5/a16?ie=UTF8&p...
$ean The EAN, ISBN-13 value
The asin, or NULL if unsuccessful.
contrib-6/amazon/amazon.module, line 677
<?php
function amazon_ean_to_asin($ean) {
$asin = NULL;
$params = array(
'ItemId' => $ean,
'IdType' => 'EAN',
'SearchIndex' => 'Books',
);
$results = amazon_http_request('ItemLookup', $params);
if (!empty($results->Items->Item->ASIN)) {
$asin = (string)$results->Items->Item->ASIN;
}
return $asin;
}
?>