'Alternative Rock ', 'blues' => 'Blues ', 'broadway_vocalists' => 'Broadway & Vocalists', 'childrens' => 'Children\'s Music ', 'christian_gospel' => 'Christian & Gospel ', 'classic_rock' => 'Classic Rock ', 'classical' => 'Classical ', 'country' => 'Country ', 'dance_dj' => 'Dance & DJ ', 'folk' => 'Folk ', 'hard_rock_metal' => 'Hard Rock & Metal ', 'international' => 'International ', 'jazz' => 'Jazz ', 'latin_music' => 'Latin Music ', 'miscellaneous' => 'Miscellaneous ', 'new_age' => 'New Age ', 'opera_vocal' => 'Opera & Vocal ', 'pop' => 'Pop ', 'rnb' => 'R&B ', 'rap_hip-hop' => 'Rap & Hip-Hop ', 'rock' => 'Rock ', 'soundtracks' => 'Soundtracks ', '499' => 'Albums $4.99 and Under ', '599' => 'Albums $5.00 to $5.99 ', '699' => 'Albums $6.00 to $6.99 ', '799' => 'Albums $7.00 to $7.99 ', '899' => 'Albums $8.99 and Up ', 'free' => 'Free Albums ' ); $album_genres = array( 'alternative' => '195212011', 'blues' => '195223011', 'broadway_vocalists' => '195235011', 'childrens' => '195239011', 'christian_gospel' => '195244011', 'classic_rock' => '195254011', 'classical' => '195264011', 'country' => '195311011', 'dance_dj' => '195322011', 'folk' => '195336011', 'hard_rock_metal' => '195343011', 'international' => '195352011', 'jazz' => '195368011', 'latin_music' => '195385011', 'miscellaneous' => '196371011', 'new_age' => '196367011', 'opera_vocal' => '195391011', 'pop' => '195407011', 'rnb' => '195419011', 'rap_hip-hop' => '195430011', 'rock' => '195441011', 'soundtracks' => '195455011', '499' => '318773011', '599' => '318772011', '699' => '318771011', '799' => '318770011', '899' => '318769011', 'free' => '318774011' ); $song_genres = array( 'alternative' => '324384011', 'blues' => '324396011', 'broadway_vocalists' => '324409011', 'childrens' => '324414011', 'christian_gospel' => '324420011', 'classic_rock' => '324431011', 'classical' => '324442011', 'country' => '324492011', 'dance_dj' => '324504011', 'folk' => '324519011', 'hard_rock_metal' => '324527011', 'international' => '324537011', 'jazz' => '324552011', 'latin_music' => '324570011', 'miscellaneous' => '324577011', 'new_age' => '324586011', 'opera_vocal' => '324591011', 'pop' => '324608011', 'rnb' => '324621011', 'rap_hip-hop' => '324633011', 'rock' => '324645011', 'soundtracks' => '324660011' ); //Set up the operation in the request function Singles($BNode = '324382011'){ $cached = checkCache($BNode); // $cached = FALSE; if($cached !== FALSE){ return unserialize($cached); } else{ $output = array(); // Set the values for some of the parameters. $operation = "BrowseNodeLookup"; $responseGroup = "TopSellers"; $parsed_xml = aws_signed_request("com", array("Operation"=>$operation,"SearchIndex"=>"MP3Downloads","BrowseNodeId"=>$BNode,"AssociateTag"=>ASSOC_TAG,"ResponseGroup"=>$responseGroup), PUBLIC_KEY, PRIVATE_KEY); foreach($parsed_xml->BrowseNodes->BrowseNode->TopItemSet->TopItem as $item){ // get more info about the item through the ASID $output[] = TrackSearch($item->ASIN, $detail); // debug($item); }; // debug($parsed_xml); // cache the data addToCache($BNode, serialize($output)); return $output; } } //Set up the operation in the request function Artists($BNode = '324383011'){ $cached = checkCache($BNode); // $cached = FALSE; if($cached !== FALSE){ return unserialize($cached); } else{ $output = array(); // Set the values for some of the parameters. $operation = "BrowseNodeLookup"; $responseGroup = "TopSellers"; $parsed_xml = aws_signed_request("com", array("Operation"=>$operation,"SearchIndex"=>"MP3Downloads","BrowseNodeId"=>$BNode,"AssociateTag"=>ASSOC_TAG,"ResponseGroup"=>$responseGroup), PUBLIC_KEY, PRIVATE_KEY); foreach($parsed_xml->BrowseNodes->BrowseNode->TopItemSet->TopItem as $item){ // get more info about the item through the ASID $output[] = ArtistSearch($item->ASIN); //debug($item); }; //debug($parsed_xml); // cache the data addToCache($BNode, serialize($output)); return $output; } } //Set up the operation in the request function Albums($BNode = '324381011'){ $operation = "BrowseNodeLookup"; $responseGroup = "TopSellers"; $cached = checkCache($BNode); // $cached = FALSE; if($cached !== FALSE){ return unserialize($cached); } else{ // set up the output variable $output = array(); //Set the values for some of the parameters. $operation = "BrowseNodeLookup"; $responseGroup = "TopSellers"; $parsed_xml = aws_signed_request("com", array("Operation"=>$operation,"SearchIndex"=>"MP3Downloads","BrowseNodeId"=>$BNode,"AssociateTag"=>ASSOC_TAG,"ResponseGroup"=>$responseGroup), PUBLIC_KEY, PRIVATE_KEY); foreach($parsed_xml->BrowseNodes->BrowseNode->TopItemSet->TopItem as $item){ // get more info about the item through the ASID $output[] = AlbumSearch($item->ASIN); //debug($item); }; // cache the data addToCache($BNode, serialize($output)); return $output; } } //Set up the operation in the request function AlbumSearch($ItemASIN = 'B001IXQU3O'){ //Set the values for some of the parameters. $operation = "ItemLookup"; $responseGroup = "Request,Offers,OfferFull,ItemAttributes,Images,RelatedItems,SalesRank,Reviews"; $parsed_xml = aws_signed_request("com", array("AssociateTag"=>ASSOC_TAG,"Operation"=>$operation,"ItemId"=>$ItemASIN,"RelationshipType"=>"DigitalMusicPrimaryArtist","ResponseGroup"=>$responseGroup), PUBLIC_KEY, PRIVATE_KEY); $item = $parsed_xml->Items->Item; $url = (string) $item->DetailPageURL; $title = (string) $item->ItemAttributes->Title; $artist = ArtistSearch($item->RelatedItems->RelatedItem->Item->ASIN); $price = (string) $item->OfferSummary->LowestNewPrice->FormattedPrice; $rating = (string) $item->CustomerReviews->AverageRating; $total_ratings = (string) $item->CustomerReviews->TotalReviews; $ranking = (string) $item->SalesRank; $cover_image = (string) $item->MediumImage->URL; $small_image = (string) $item->SmallImage->URL; return array( 'price' => $price, 'url' => $url, 'title' => $title, 'artist' => $artist, 'rating' => $rating, 'total_ratings' => $total_ratings, 'ranking' => $ranking, 'cover_image' => $cover_image, 'small_image' => $small_image ); // $price.'  '.$title.''.$artist_link; } //Set up the operation in the request function TrackSearch($ItemASIN = 'B001IXQU3O', $detail = 'more'){ //Set the values for some of the parameters. $operation = "ItemLookup"; $responseGroup = "Request,Offers,OfferFull,ItemAttributes,Images,RelatedItems,SalesRank,Reviews"; $parsed_xml = aws_signed_request("com", array("AssociateTag"=>ASSOC_TAG,"Operation"=>$operation,"ItemId"=>$ItemASIN,"RelationshipType"=>"DigitalMusicPrimaryArtist","ResponseGroup"=>$responseGroup), PUBLIC_KEY, PRIVATE_KEY); $item = $parsed_xml->Items->Item; $url = (string) $item->DetailPageURL; $title = (string) $item->ItemAttributes->Title; $artist = ArtistSearch($item->RelatedItems->RelatedItem->Item->ASIN); $price = (string) $item->OfferSummary->LowestNewPrice->FormattedPrice; $rating = (string) $item->CustomerReviews->AverageRating; $total_ratings = (string) $item->CustomerReviews->TotalReviews; $ranking = (string) $item->SalesRank; $cover_image = (string) $item->MediumImage->URL; return array( 'price' => $price, 'url' => $url, 'title' => $title, 'artist' => $artist, 'rating' => $rating, 'total_ratings' => $total_ratings, 'ranking' => $ranking, 'cover_image' => $cover_image ); // return $price.'  '.$title.''.$artist_link; } //Set up the operation in the request function ArtistSearch($ItemASIN = 'B001IXQU3O'){ //Set the values for some of the parameters. $operation = "ItemLookup"; $responseGroup = "Request,Offers,OfferFull,ItemAttributes,Images"; $parsed_xml = aws_signed_request("com", array("AssociateTag"=>ASSOC_TAG,"Operation"=>$operation,"ItemId"=>$ItemASIN,"RelationshipType"=>"DigitalMusicPrimaryArtist","ResponseGroup"=>$responseGroup), PUBLIC_KEY, PRIVATE_KEY); $item = $parsed_xml->Items->Item; $url = (string) $item->DetailPageURL; $artist = (string) $item->ItemAttributes->Title; $image = (string) $item->MediumImage->URL; if($artist != ''){ return array('url' => $url, 'name' => $artist, 'image' => $image); } else { return array(); } } function debug($arr){ echo '
';
	print_r($arr);
	echo '
'; } function getXMLNode($node){ $node_xml = $node->asXML(); return preg_replace('/.*>(.*?)<.*/', '$1', $node_xml); } function checkCache($page = 'default'){ global $DB; $page = ($page == '')?'default':$page; $current_time = date('Y-m-d H:i:s'); $results = $DB->query("SELECT *, CONCAT(CURRENT_DATE, ' ', CURRENT_TIME) FROM amazon_mp3_cache WHERE path = '{$page}' AND DATE_SUB(TIMESTAMP(CONCAT(CURRENT_DATE, ' ', CURRENT_TIME)), INTERVAL 4 HOUR) <= timestamp"); if($results->num_rows > 0){ return $results->row['data']; } else{ return FALSE; } } function addToCache($page = 'default', $output = NULL){ // add the data to the cache global $DB; $page = ($page == '')?'default':$page; $results = $DB->query("SELECT * FROM amazon_mp3_cache WHERE path = '{$page}'"); if($results->num_rows > 0){ // update the existing record $update_data = array( 'data' => $output ); $sql = $DB->update_string("amazon_mp3_cache", $update_data, "path = '" . $DB->escape_str($page) . "'"); } else { // insert a new record $insert_data = array( 'path' => $page, 'data' => $output, 'timestamp' => date('Y-m-d H:i:s') ); $sql = $DB->insert_string("amazon_mp3_cache", $insert_data); } $DB->query($sql); } ?> {assign_variable:section="testimonials"} {assign_variable:template_group="careers"} {assign_variable:template="testimonials"} {assign_variable:default_entry="23"} {assign_variable:disable="member_data|pagination|trackbacks"}
' . $genre_titles['new_age'] . ''; $i = 1; foreach(Singles($song_genres['new_age']) as $song){ ?>

by

Rated /5 by users