public function CoverSearch($nameSong) { try { // get a new object with your API Key and secret key. Lang is optional. // if you leave lang blank it will be US. $amazonEcs = new AmazonECS('AKIAJ45XKTAZEFQWMN3Q', 'VwUj6FDtpTu/JcAl6cLsGfw0eQIc2A3uvhYv3mYv', 'de', 'ASSOCIATE TAG'); $this->cover = $amazonEcs->returnType('1')->country('de')->category('All')->responseGroup('Small,Images')->search($nameSong); } catch (Exception $e) { echo $e->getMessage(); } }
// get a new object with your API Key and secret key. Lang is optional. // if you leave lang blank it will be US. $amazonEcs = new AmazonECS(AWS_API_KEY, AWS_API_SECRET_KEY, 'de', AWS_ASSOCIATE_TAG); // If you are at min version 1.3.3 you can enable the requestdelay. // This is usefull to get rid of the api requestlimit. // It depends on your current associate status and it is disabled by default. // $amazonEcs->requestDelay(true); // for the new version of the wsdl its required to provide a associate Tag // @see https://affiliate-program.amazon.com/gp/advertising/api/detail/api-changes.html?ie=UTF8&pf_rd_t=501&ref_=amb_link_83957571_2&pf_rd_m=ATVPDKIKX0DER&pf_rd_p=&pf_rd_s=assoc-center-1&pf_rd_r=&pf_rd_i=assoc-api-detail-2-v2 // you can set it with the setter function or as the fourth paramameter of ther constructor above $amazonEcs->associateTag(AWS_ASSOCIATE_TAG); // changing the category to DVD and the response to only images and looking for some matrix stuff. $response = $amazonEcs->category('DVD')->responseGroup('Large')->search("Matrix Revolutions"); //var_dump($response); // from now on you want to have pure arrays as response $amazonEcs->returnType(AmazonECS::RETURN_TYPE_ARRAY); // searching again $response = $amazonEcs->search('Bud Spencer'); //var_dump($response); // and again... Changing the responsegroup and category before $response = $amazonEcs->responseGroup('Small')->category('Books')->search('PHP 5'); //var_dump($response); // category has been set so lets have a look for another book $response = $amazonEcs->search('MySql'); //var_dump($response); // want to look in the US Database? No Problem $response = $amazonEcs->country('com')->search('MySql'); //var_dump($response); // or Japan? $response = $amazonEcs->country('co.jp')->search('MySql'); //var_dump($response);
public function CoverSearch($nameSong) { try { // get a new object with your API Key and secret key. Lang is optional. // if you leave lang blank it will be US. $amazonEcs = new AmazonECS('AKIAJ45XKTAZEFQWMN3Q', 'VwUj6FDtpTu/JcAl6cLsGfw0eQIc2A3uvhYv3mYv', 'de', 'ASSOCIATE TAG'); //foreach ($nameSong as $song){ $this->cover = $amazonEcs->returnType('1')->country('de')->category('All')->responseGroup('Small,Images')->search($nameSong); //$track = $amazonEcs->returnType('1')->country('de')->category('All')->responseGroup('Tracks')->search($nameSong); //var_dump($track['Items']['Item']); //return $this->cover; //} /* $response = $amazonEcs->returnType('1')->country('de')->category('All')->responseGroup('Small,Images')->search('Fields Of The Nephilim - Requiem Xiii-33 (Le Veilleur Silencieux)'); //var_dump($response); if (isset($response['Items']['Item']) ) { if (isset($response['Items']['Item'])) { //loop through each item foreach ($response['Items'] as $result) { //var_dump($result['ItemLinks']); //check that there is a ASIN code - for some reason, some items are not //correctly listed. Im sure there is a reason for it, need to check. if (isset($result['ASIN'])) { //store the ASIN code in case we need it $asin = $result['ASIN']; print_r($asin); //check that there is a URL. If not - no need to bother showing //this one as we only want linkable items if (isset($result['DetailPageURL'])) { //set up a container for the details - this could be a DIV echo "<p min-height: 60px; font-size: 90%;'>"; //create the URL link echo "<a target='_Blank' href='" . $result['DetailPageURL'] . "'>"; //if there is a small image - show it if (isset($result['SmallImage']['URL'])) { echo "<img src='" . $result['SmallImage']['URL'] . "'>"; echo "<h3>". $result['SmallImage']['URL'] . "</h3>"; } // if there is a title - show it // if (isset($result['ItemAttributes']['Title'])) { // //var_dump($result); // echo "<h2>" . $result['ItemAttributes']['Title'] . "</h2>"; // echo "<h2>" . $result['ItemAttributes']['Creator']['_'] . "</h2><br/>"; // } //close the paragraph echo "</a></p>"; } } } } }*/ } catch (Exception $e) { echo $e->getMessage(); } }
{ if (false === is_null($enable) && true === is_bool($enable)) { $this->requestConfig['requestDelay'] = $enable; return $this; } return $this->requestConfig['requestDelay']; } } define('AWS_API_KEY', 'AKIAJU2GXE5GKCFCHDVA'); define('AWS_API_SECRET_KEY', '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'); define('AWS_ASSOCIATE_TAG', 'ASSOCIATE TAG'); define('AWS_ANOTHER_ASSOCIATE_TAG', 'ANOTHER ASSOCIATE TAG'); // Verbindung zu Amazon herstellen $amazonEcs = new AmazonECS(AWS_API_KEY, AWS_API_SECRET_KEY, 'DE', AWS_ASSOCIATE_TAG); // for the new version of the wsdl its required to provide a associate Tag // @see https://affiliate-program.amazon.com/gp/advertising/api/detail/api-changes.html?ie=UTF8&pf_rd_t=501&ref_=amb_link_83957571_2&pf_rd_m=ATVPDKIKX0DER&pf_rd_p=&pf_rd_s=assoc-center-1&pf_rd_r=&pf_rd_i=assoc-api-detail-2-v2 // you can set it with the setter function or as the fourth paramameter of ther constructor above $amazonEcs->associateTag(AWS_ASSOCIATE_TAG); // from now on you want to have pure arrays as response $amazonEcs->returnType(AmazonECS::RETURN_TYPE_OBJECT);