<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>iBlog random &#187; amazon</title>
	<atom:link href="http://blog.zurka.us/tag/amazon/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zurka.us</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 28 May 2013 20:28:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6</generator>
		<item>
		<title>Use PHP to Fetch an Album Artwork From Amazon</title>
		<link>http://blog.zurka.us/use-php-fetch-artwork-cd-from-amazon/</link>
		<comments>http://blog.zurka.us/use-php-fetch-artwork-cd-from-amazon/#comments</comments>
		<pubDate>Sun, 17 May 2009 22:59:16 +0000</pubDate>
		<dc:creator>nasal</dc:creator>
				<category><![CDATA[Whatever]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.zurka.us/?p=930</guid>
		<description><![CDATA[It&#8217;s actually pretty easy once you find out how to do it. By having the artist and album name you can fetch the album artwork from Amazon in three different sizes. With php5 it&#8217;s very easy since it has an integrated xml parser. All we have to do is this: $url = simplexml_load_file(&#039;http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&#38;AWSAccessKeyId=12DR2PGAQT303YTEWP02&#38;Operation=ItemSearch&#38;SearchIndex=Music&#38;Artist=ARTIST&#38;ResponseGroup=Images&#38;Keywords=ALBUMNAME&#039;); Please note [&#8230;]]]></description>
				<content:encoded><![CDATA[<div style="padding-top:15px;padding-right:0px;padding-bottom:0px;padding-left:0px;;" class="linksalpha_widget">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=iBlog+random&link=http%3A%2F%2Fblog.zurka.us%2Fuse-php-fetch-artwork-cd-from-amazon%2F&title=Use+PHP+to+Fetch+an+Album+Artwork+From+Amazon&desc=It%27s+actually+pretty+easy+once+you+find+out+how+to+do+it.+By+having+the+artist+and+album+name+you+can+fetch+the+album+artwork+from+Amazon+in+three+different+sizes.+With+php5+it%27s+very+easy+since+it+has+an+integrated+xml+parser.+All+we+have+to+do+is+this%3A+%24url+%3D&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=&twrelated1=&twrelated2=&twctr=1&lnkdshow=noshow&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=1&diggbutton=1&diggctr=1&stblbutton=1&stblctr=1&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p>It&#8217;s actually pretty easy once you find out how to do it. By having the artist and album name you can fetch the album artwork from Amazon in three different sizes.</p>
<p>With <strong>php5</strong> it&#8217;s very easy since it has an integrated xml parser. All we have to do is this:<br />
<span id="more-930"></span></p>
<pre class="brush: php">$url = simplexml_load_file(&#039;http://webservices.amazon.com/onca/xml?Service=AWSECommerceService&amp;AWSAccessKeyId=12DR2PGAQT303YTEWP02&amp;Operation=ItemSearch&amp;SearchIndex=Music&amp;Artist=ARTIST&amp;ResponseGroup=Images&amp;Keywords=ALBUMNAME&#039;);</pre>
<p>Please note that in the url I&#8217;ve put <strong>ARTIST</strong> and <strong>ALBUMNAME</strong>, which you should <strong>replace</strong> with what you&#8217;re searching for. Doing so, we get an xml file from which we can display the image like this:</p>
<pre class="brush: php">echo &#039;&lt;img src=&quot;&#039; . $url-&gt;Items-&gt;Item[0]-&gt;LargeImage-&gt;URL . &#039;&quot; /&gt;&#039;;</pre>
<p>If we want the large one, that is. If we would like the medium one we would use MediumImage and SmallImage for the small one.</p>
<p>That&#8217;s it, it&#8217;s very useful if you are organizing your mp3 files or maybe building an online community or something.</p>
<p>Hope it helps somebody! If you find it useful, digg it!</p>
<p><em>ps: I forgot to mention that if you are using php4 this wont work, you will have to use another <a href="http://www.google.com/search?q=php4+xml+parser">xml parser</a> to fetch the image location from the xml provided by Amazon.</em></p>
<p>Have swing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.zurka.us/use-php-fetch-artwork-cd-from-amazon/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
