<?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>Money-Code &#187; store fronts</title>
	<atom:link href="http://www.money-code.com/tag/store-fronts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.money-code.com</link>
	<description>Coding For Online Success</description>
	<lastBuildDate>Tue, 15 Nov 2011 18:25:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Thinking out loud about EPN Quality Click Pricing (QCP)</title>
		<link>http://www.money-code.com/2009/09/thinking-out-load-about-epn-quality-click-pricing-qcp/</link>
		<comments>http://www.money-code.com/2009/09/thinking-out-load-about-epn-quality-click-pricing-qcp/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 03:05:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[EPN]]></category>
		<category><![CDATA[PPC]]></category>
		<category><![CDATA[cj]]></category>
		<category><![CDATA[qcp]]></category>
		<category><![CDATA[quality click pricing]]></category>
		<category><![CDATA[reviewazon]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[store fronts]]></category>
		<category><![CDATA[ysm]]></category>

		<guid isPermaLink="false">http://www.money-code.com/?p=563</guid>
		<description><![CDATA[So, I&#8217;ve been paying close attention to analytics and most importantly, my QCP preview in EPN reporting. Just like what it was stating for the end of August, my earnings will be looking really good under this model and I was trying to figure out why. I really think the major benefit in my case [...]


Related posts:<ol><li><a href='http://www.money-code.com/2009/09/quality-click-pricing-qcp-starts-tomorrow-1012009/' rel='bookmark' title='Quality Click Pricing (QCP) starts tomorrow (10/1/2009)'>Quality Click Pricing (QCP) starts tomorrow (10/1/2009)</a></li>
<li><a href='http://www.money-code.com/2009/08/epn-quality-click-pricing-my-thoughts/' rel='bookmark' title='EPN &#8211; Quality Click Pricing (My Thoughts)'>EPN &#8211; Quality Click Pricing (My Thoughts)</a></li>
<li><a href='http://www.money-code.com/2009/09/epn-webinar-about-quality-click-pricing/' rel='bookmark' title='EPN webinar about Quality Click Pricing'>EPN webinar about Quality Click Pricing</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.money-code.com%2F2009%2F09%2Fthinking-out-load-about-epn-quality-click-pricing-qcp%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.money-code.com%2F2009%2F09%2Fthinking-out-load-about-epn-quality-click-pricing-qcp%2F&amp;source=hanjicode&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignleft size-full wp-image-301" title="ebay-partner-network" src="http://www.money-code.com/wp-content/uploads/2009/06/ebay-partner-network.jpg" alt="ebay-partner-network" width="150" height="150" />So, I&#8217;ve been paying close attention to analytics and most importantly, my QCP preview in EPN reporting. Just like what it was stating for the end of August, my earnings will be looking really good under this model and I was trying to figure out why.</p>
<p>I really think the major benefit in my case is that I use <a href="http://www.money-code.com/2007/12/how-to-use-ppc-with-your-ebay-affiliate-store-fronts/" target="_self">limited PPC via YSM</a> to promote my good earning niche sites. I never been too heavy in SEO, and relied on PPC to drive traffic to these sites. Finding the right balance of advertising cost with profits earned is tricky, but I think that is why my EPC is good on these sites. I&#8217;m driving &#8216;buyers&#8217; to come to the site, and eventually &#8216;buy&#8217; on eBay vs. driving a bunch of readers. I wrote a post about this in January 2008 &#8220;<a href="http://www.money-code.com/2008/01/readers-vs-buyers/" target="_self">Readers vs. Buyers</a>&#8220;.</p>
<p>Now, with this improvement with EPC, I think I&#8217;ll do some tests in October or November by ramping up my PPC campaigns to drive more quality traffic to eBay.</p>
<p>While I&#8217;m still waiting for the dust to settle, I&#8217;ve been working hard (hence the lack of recent posts) on creating Amazon store fronts, CJ based store fronts, <a href="http://www.money-code.com/2009/07/hub-blogs-strategy/" target="_self">hub support blogs</a> to my various sites. I&#8217;ve been working on creating a new Amazon store front plugin, but I&#8217;ve been absolutely LOVING <a href="http://www.money-code.com/target/reviewazon.php" target="_blank">ReviewAzon</a>. I can&#8217;t say enough how great this plugin is. If you&#8217;re interested in working on your Amazon affiliate efforts, please pick this plugin up. <a href="http://www.money-code.com/target/reviewazon.php" target="_blank">Only $79, you can&#8217;t afford to NOT try it</a>.</p>
<h4>Incoming search terms:</h4><ul><li>identify which ePN clicks come from search results</li></ul><div style='clear:both'></div>

<p>Related posts:<ol><li><a href='http://www.money-code.com/2009/09/quality-click-pricing-qcp-starts-tomorrow-1012009/' rel='bookmark' title='Quality Click Pricing (QCP) starts tomorrow (10/1/2009)'>Quality Click Pricing (QCP) starts tomorrow (10/1/2009)</a></li>
<li><a href='http://www.money-code.com/2009/08/epn-quality-click-pricing-my-thoughts/' rel='bookmark' title='EPN &#8211; Quality Click Pricing (My Thoughts)'>EPN &#8211; Quality Click Pricing (My Thoughts)</a></li>
<li><a href='http://www.money-code.com/2009/09/epn-webinar-about-quality-click-pricing/' rel='bookmark' title='EPN webinar about Quality Click Pricing'>EPN webinar about Quality Click Pricing</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.money-code.com/2009/09/thinking-out-load-about-epn-quality-click-pricing-qcp/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Understanding the Amazon Product Advertising API</title>
		<link>http://www.money-code.com/2009/08/understanding-the-amazon-product-advertising-api/</link>
		<comments>http://www.money-code.com/2009/08/understanding-the-amazon-product-advertising-api/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 13:57:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[quality click pricing]]></category>
		<category><![CDATA[reviewazon]]></category>
		<category><![CDATA[store fronts]]></category>

		<guid isPermaLink="false">http://www.money-code.com/?p=551</guid>
		<description><![CDATA[I&#8217;ve been working on some Amazon store fronts. With the recent chatter about the EPN Quality Click Pricing, I thought it would be good to focus on a few other sites while the dust settles. I have confidence that everything with EPN will work out, but this is a good reminder that one should stay [...]


Related posts:<ol><li><a href='http://www.money-code.com/2009/08/amazon-product-api-signaturedoesnotmatch-error-response/' rel='bookmark' title='Amazon Product API: SignatureDoesNotMatch error response'>Amazon Product API: SignatureDoesNotMatch error response</a></li>
<li><a href='http://www.money-code.com/2009/09/finding-browsenodes-for-amazon-api-search-aws/' rel='bookmark' title='Finding BrowseNodes for Amazon API search (AWS)'>Finding BrowseNodes for Amazon API search (AWS)</a></li>
<li><a href='http://www.money-code.com/2009/05/amazon-associates-web-service-changes/' rel='bookmark' title='Amazon Associates Web Service Changes'>Amazon Associates Web Service Changes</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.money-code.com%2F2009%2F08%2Funderstanding-the-amazon-product-advertising-api%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.money-code.com%2F2009%2F08%2Funderstanding-the-amazon-product-advertising-api%2F&amp;source=hanjicode&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignleft" title="Amazon Product Advertising API" src="http://developer.amazonwebservices.com/connect/images/amazon/logo_aws.gif" alt="" width="164" height="60" />I&#8217;ve been working on some Amazon store fronts. With the recent chatter about the <a href="http://www.money-code.com/2009/08/ebay-partner-network-quality-click-pricing-webinar-notes/" target="_blank">EPN Quality Click Pricing</a>, I thought it would be good to focus on a few other sites while the dust settles. I have confidence that everything with EPN will work out, but this is a good reminder that one should stay diversified.</p>
<p>I&#8217;m basically working on a few things. The first priority was to get my existing sites working after the<a href="http://www.money-code.com/2009/08/amazon-product-api-signaturedoesnotmatch-error-response/" target="_blank"> signed authentication change</a> which happened on August 15th. The next priority was to find a new blog plugin that would handle Amazon products nicely. I found <a href="http://www.money-code.com/2009/08/review-of-reviewazon/" target="_blank">ReviewAzon</a>, which fits my needs perfectly for posting products, but I needed a good &#8216;store front&#8217; script or way to include this with my <a href="http://www.money-code.com/2009/08/review-of-reviewazon/" target="_blank">ReviewAzon</a> sites.</p>
<p>I found <a href="http://wordpress.org/extend/plugins/amazon-niche-store/screenshots/" target="_blank">Amazon Niche Store</a>, which is free, and it looks similar to my various store fronts, but I wasn&#8217;t happy about the results being returned from the author&#8217;s server. So I figured I need to modify the plugin and do the lookup and presentation on my own. The author also displayed his tracking code 10% of the time (which he states). This was a fun project, since I&#8217;ve never worked on a plugin and it seems lately I&#8217;ve been doing a lot of WordPress stuff.</p>
<p>I wanted to state that finding good documentation about the Amazon AWS or Product Advertising API is somewhat difficult (not sure why), but since I found the proper docs, I wanted to post them here. The <a href="http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/" target="_blank">Product Advertising API Developer Guide</a> is must have link if you&#8217;re going to be doing any work with the API, it gives you a complete run down of the Operations needed to ask the appropriate questions to Amazon and return products.</p>
<p>I was able to rewrite that plugin and include it within my <a href="http://www.money-code.com/2009/08/review-of-reviewazon/" target="_blank">ReviewAzon</a> sites by creating a category &#8216;stores&#8217; within the blogs. One immediate challenge I had with that plugin re-write was the ability of returning more than 10 products, which appears to be a very common problem. My solution, and not sure if it&#8217;s the best, is to loop through the requests to get multiple pages and adding them to a array. To save on additional calls I serialized the array and stored it in the WP options table based on keyword searched with a timestamp. If the timestamp is expired, it will do another lookup, etc.</p>
<p>If any of you have dealt with this in the past and has a better solution, please let me know!</p>
<h4>Incoming search terms:</h4><ul><li>Amazon Product Advertising API</li><li>amazon product advertising api categories</li><li>amazon product advertising api cost</li><li>amazon product advertising api php tutorial</li><li>amazon api save</li><li>amazon store api php</li><li>amazon store api</li><li>amazon product api tutorial using php</li><li>amazon product api php</li><li>amazone api storing products to database</li></ul><div style='clear:both'></div>

<p>Related posts:<ol><li><a href='http://www.money-code.com/2009/08/amazon-product-api-signaturedoesnotmatch-error-response/' rel='bookmark' title='Amazon Product API: SignatureDoesNotMatch error response'>Amazon Product API: SignatureDoesNotMatch error response</a></li>
<li><a href='http://www.money-code.com/2009/09/finding-browsenodes-for-amazon-api-search-aws/' rel='bookmark' title='Finding BrowseNodes for Amazon API search (AWS)'>Finding BrowseNodes for Amazon API search (AWS)</a></li>
<li><a href='http://www.money-code.com/2009/05/amazon-associates-web-service-changes/' rel='bookmark' title='Amazon Associates Web Service Changes'>Amazon Associates Web Service Changes</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.money-code.com/2009/08/understanding-the-amazon-product-advertising-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amazon Product API: SignatureDoesNotMatch error response</title>
		<link>http://www.money-code.com/2009/08/amazon-product-api-signaturedoesnotmatch-error-response/</link>
		<comments>http://www.money-code.com/2009/08/amazon-product-api-signaturedoesnotmatch-error-response/#comments</comments>
		<pubDate>Tue, 18 Aug 2009 04:18:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Affiliate Marketing]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[store fronts]]></category>
		<category><![CDATA[web services]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.money-code.com/?p=536</guid>
		<description><![CDATA[On August 15, 2009, all Product Advertising API developers were required to authenticate ALL calls using a hmac/sha256 signing token. For some reason, this was a major pain in the ass for me, but I finally got things to work. If you&#8217;re having trouble, and you&#8217;re using PHP5, this may help you. The first item [...]


Related posts:<ol><li><a href='http://www.money-code.com/2009/09/finding-browsenodes-for-amazon-api-search-aws/' rel='bookmark' title='Finding BrowseNodes for Amazon API search (AWS)'>Finding BrowseNodes for Amazon API search (AWS)</a></li>
<li><a href='http://www.money-code.com/2009/08/understanding-the-amazon-product-advertising-api/' rel='bookmark' title='Understanding the Amazon Product Advertising API'>Understanding the Amazon Product Advertising API</a></li>
<li><a href='http://www.money-code.com/2008/01/how-to-search-amazons-catalog-with-amazons-associate-web-service/' rel='bookmark' title='How to search Amazon&#8217;s catalog with Amazon&#8217;s Associate Web Service'>How to search Amazon&#8217;s catalog with Amazon&#8217;s Associate Web Service</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.money-code.com%2F2009%2F08%2Famazon-product-api-signaturedoesnotmatch-error-response%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.money-code.com%2F2009%2F08%2Famazon-product-api-signaturedoesnotmatch-error-response%2F&amp;source=hanjicode&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><img class="alignleft" title="Amazon Web Services" src="http://developer.amazonwebservices.com/connect/images/amazon/logo_aws.gif" alt="" width="164" height="60" />On August 15, 2009, all Product Advertising API developers were required to authenticate ALL calls using a hmac/sha256 signing token. For some reason, this was a major pain in the ass for me, but I finally got things to work.</p>
<p>If you&#8217;re having trouble, and you&#8217;re using PHP5, this may help you.</p>
<p>The first item you&#8217;ll need is the &#8216;secret&#8217;. You need to log into the Amazon Web Services area (<a href="https://developer.amazonwebservices.com" target="_blank">https://developer.amazonwebservices.com</a>). After logging in (assuming you already have a account if you&#8217;re using their API), you need to hover over &#8216;Your Account&#8217;, and click &#8216;Access Identifiers&#8217;. Here you will see &#8216;Access Key ID&#8217; and &#8216;Secret Access Key&#8217;. We&#8217;ll be referring Access Key ID as the <strong>public key</strong> and Secret Access Key as the <strong>private key</strong> in a function provided below. Copy these two values and add them to your code somewhere.</p>
<p>You will need to ensure that PHP is built with hash support. You can verify this with by view info (&lt;?phpinfo()?&gt;). If hash support is there we can use the built in <a href="http://us3.php.net/manual/en/function.hash-hmac.php" target="_blank">hash_hmac() </a>function. The concept is pretty straight forward (eventhough, I&#8217;ve been fighting it all night prior to this post). You create a string, and &#8216;hash&#8217; it with our private key, then we pass the string to Amazon&#8217;s API, and they hash the same string with our private key. The value should be the same, and if so, we&#8217;re good. If something is off any where in that sequence you&#8217;ll be getting the dreaded &#8216;<strong>SignatureDoesNotMatch</strong>&#8216; message in your XML return.</p>
<p>I came across Ulrich Mierendorff&#8217;s function for sending a signed AWS request on the developer forum, and it was the only PHP code snippet that worked for me, so I need to pass it on. Below is the function:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw2">function</span> aws_signed_request<span class="br0">&#40;</span><span class="re0">$region</span>, <span class="re0">$params</span>, <span class="re0">$public_key</span>, <span class="re0">$private_key</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; Copyright (c) 2009 Ulrich Mierendorff</p>
<p>&nbsp; &nbsp; Permission is hereby granted, free of charge, to any person obtaining a<br />
&nbsp; &nbsp; copy of this software and associated documentation files (the &quot;Software&quot;),<br />
&nbsp; &nbsp; to deal in the Software without restriction, including without limitation<br />
&nbsp; &nbsp; the rights to use, copy, modify, merge, publish, distribute, sublicense,<br />
&nbsp; &nbsp; and/or sell copies of the Software, and to permit persons to whom the<br />
&nbsp; &nbsp; Software is furnished to do so, subject to the following conditions:</p>
<p>&nbsp; &nbsp; The above copyright notice and this permission notice shall be included in<br />
&nbsp; &nbsp; all copies or substantial portions of the Software.</p>
<p>&nbsp; &nbsp; THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br />
&nbsp; &nbsp; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br />
&nbsp; &nbsp; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<br />
&nbsp; &nbsp; THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br />
&nbsp; &nbsp; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br />
&nbsp; &nbsp; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER<br />
&nbsp; &nbsp; DEALINGS IN THE SOFTWARE.<br />
&nbsp; &nbsp; */</span></p>
<p>&nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; Parameters:<br />
&nbsp; &nbsp; &nbsp; &nbsp; $region &#8211; the Amazon(r) region (ca,com,co.uk,de,fr,jp)<br />
&nbsp; &nbsp; &nbsp; &nbsp; $params &#8211; an array of parameters, eg. array(&quot;Operation&quot;=&gt;&quot;ItemLookup&quot;,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;ItemId&quot;=&gt;&quot;B000X9FLKM&quot;, &quot;ResponseGroup&quot;=&gt;&quot;Small&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; $public_key &#8211; your &quot;Access Key ID&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $private_key &#8211; your &quot;Secret Access Key&quot;<br />
&nbsp; &nbsp; */</span></p>
<p>&nbsp; &nbsp; <span class="co1">// some paramters</span><br />
&nbsp; &nbsp; <span class="re0">$method</span> = <span class="st0">&quot;GET&quot;</span>;<br />
&nbsp; &nbsp; <span class="re0">$host</span> = <span class="st0">&quot;ecs.amazonaws.&quot;</span>.<span class="re0">$region</span>;<br />
&nbsp; &nbsp; <span class="re0">$uri</span> = <span class="st0">&quot;/onca/xml&quot;</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// additional parameters</span><br />
&nbsp; &nbsp; <span class="re0">$params</span><span class="br0">&#91;</span><span class="st0">&quot;Service&quot;</span><span class="br0">&#93;</span> = <span class="st0">&quot;AWSECommerceService&quot;</span>;<br />
&nbsp; &nbsp; <span class="re0">$params</span><span class="br0">&#91;</span><span class="st0">&quot;AWSAccessKeyId&quot;</span><span class="br0">&#93;</span> = <span class="re0">$public_key</span>;<br />
&nbsp; &nbsp; <span class="co1">// GMT timestamp</span><br />
&nbsp; &nbsp; <span class="re0">$params</span><span class="br0">&#91;</span><span class="st0">&quot;Timestamp&quot;</span><span class="br0">&#93;</span> = <a href="http://www.php.net/gmdate"><span class="kw3">gmdate</span></a><span class="br0">&#40;</span><span class="st0">&quot;Y-m-d<span class="es0">\T</span>H:i:s<span class="es0">\Z</span>&quot;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="co1">// API version</span><br />
&nbsp; &nbsp; <span class="re0">$params</span><span class="br0">&#91;</span><span class="st0">&quot;Version&quot;</span><span class="br0">&#93;</span> = <span class="st0">&quot;2009-03-31&quot;</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// sort the parameters</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/ksort"><span class="kw3">ksort</span></a><span class="br0">&#40;</span><span class="re0">$params</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// create the canonicalized query</span><br />
&nbsp; &nbsp; <span class="re0">$canonicalized_query</span> = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="kw1">foreach</span> <span class="br0">&#40;</span><span class="re0">$params</span> <span class="kw1">as</span> <span class="re0">$param</span>=&gt;<span class="re0">$value</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$param</span> = <a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;%7E&quot;</span>, <span class="st0">&quot;~&quot;</span>, <a href="http://www.php.net/rawurlencode"><span class="kw3">rawurlencode</span></a><span class="br0">&#40;</span><span class="re0">$param</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$value</span> = <a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;%7E&quot;</span>, <span class="st0">&quot;~&quot;</span>, <a href="http://www.php.net/rawurlencode"><span class="kw3">rawurlencode</span></a><span class="br0">&#40;</span><span class="re0">$value</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$canonicalized_query</span><span class="br0">&#91;</span><span class="br0">&#93;</span> = <span class="re0">$param</span>.<span class="st0">&quot;=&quot;</span>.<span class="re0">$value</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="re0">$canonicalized_query</span> = <a href="http://www.php.net/implode"><span class="kw3">implode</span></a><span class="br0">&#40;</span><span class="st0">&quot;&amp;amp;&quot;</span>, <span class="re0">$canonicalized_query</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// create the string to sign</span><br />
&nbsp; &nbsp; <span class="re0">$string_to_sign</span> = <span class="re0">$method</span>.<span class="st0">&quot;<span class="es0">\n</span>&quot;</span>.<span class="re0">$host</span>.<span class="st0">&quot;<span class="es0">\n</span>&quot;</span>.<span class="re0">$uri</span>.<span class="st0">&quot;<span class="es0">\n</span>&quot;</span>.<span class="re0">$canonicalized_query</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// calculate HMAC with SHA256 and base64-encoding</span><br />
&nbsp; &nbsp; <span class="re0">$signature</span> = <a href="http://www.php.net/base64_encode"><span class="kw3">base64_encode</span></a><span class="br0">&#40;</span>hash_hmac<span class="br0">&#40;</span><span class="st0">&#8216;sha256&#8242;</span>, <span class="re0">$string_to_sign</span>, <span class="re0">$private_key</span>, <span class="kw2">True</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// encode the signature for the request</span><br />
&nbsp; &nbsp; <span class="re0">$signature</span> = <a href="http://www.php.net/str_replace"><span class="kw3">str_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;%7E&quot;</span>, <span class="st0">&quot;~&quot;</span>, <a href="http://www.php.net/rawurlencode"><span class="kw3">rawurlencode</span></a><span class="br0">&#40;</span><span class="re0">$signature</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// create request</span><br />
&nbsp; &nbsp; <span class="re0">$request</span> = <span class="st0">&quot;http://&quot;</span>.<span class="re0">$host</span>.<span class="re0">$uri</span>.<span class="st0">&quot;?&quot;</span>.<span class="re0">$canonicalized_query</span>.<span class="st0">&quot;&amp;amp;Signature=&quot;</span>.<span class="re0">$signature</span>;</p>
<p>&nbsp; &nbsp; <span class="co1">// do request</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$ch</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = curl_init<span class="br0">&#40;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_RETURNTRANSFER, <span class="nu0">1</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; curl_setopt<span class="br0">&#40;</span><span class="re0">$ch</span>, CURLOPT_URL, <span class="re0">$request</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$response</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = curl_exec<span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; curl_close<span class="br0">&#40;</span><span class="re0">$ch</span><span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$response</span> === <span class="kw2">False</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">False</span>;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// parse XML</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pxml</span> = simplexml_load_string<span class="br0">&#40;</span><span class="re0">$response</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$pxml</span> === <span class="kw2">False</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">False</span>; <span class="co1">// no xml</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$pxml</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div>
<p>To call the function you create a array of arguments and pass it to the function along with the keys values.</p>
<div class="dean_ch" style="white-space: wrap;"><span class="re0">$amazontag</span>&nbsp; &nbsp; &nbsp; = <span class="st0">&#8216;asdfasfd-20&#8242;</span>;<br />
<span class="re0">$public_key</span> = <span class="st0">&quot;asfdasdfasdfasfdasfda&quot;</span>;<br />
<span class="re0">$private_key</span> = <span class="st0">&quot;SECRETKEYasfdasdfasdfasfdasfda&quot;</span>;<br />
<span class="re0">$param</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st0">&quot;Operation&quot;</span>=&gt;<span class="st0">&quot;ItemSearch&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;IdType&quot;</span>=&gt;<span class="st0">&quot;ASIN&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;MerchantId&quot;</span>=&gt;<span class="st0">&quot;All&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;ResponseGroup&quot;</span>=&gt;<span class="st0">&quot;Large&quot;</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;SearchIndex&quot;</span>=&gt;<span class="re0">$searchindex</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;BrowseNode&quot;</span>=&gt;<span class="re0">$BrowseNode</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;Keywords&quot;</span>=&gt;<span class="re0">$safeQuery</span>,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;AWSAccessKeyId&quot;</span>=&gt;<span class="re0">$amazontag</span><span class="br0">&#41;</span>;<br />
<span class="re0">$xml</span> &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; = aws_signed_request<span class="br0">&#40;</span><span class="st0">&quot;com&quot;</span>,<span class="re0">$param</span>, <span class="re0">$public_key</span>, <span class="re0">$private_key</span><span class="br0">&#41;</span>;</div>
<p>This worked perfectly for me, and got my Amazon sites back on line. Hope this helps!!</p>
<h4>Incoming search terms:</h4><ul><li>SignatureDoesNotMatch</li><li>amazon SignatureDoesNotMatch</li><li>aws SignatureDoesNotMatch</li><li>signaturedoesnotmatch amazon</li><li>&lt;Code&gt;SignatureDoesNotMatch&lt;/Code&gt;</li><li>AWS Error Code: SignatureDoesNotMatch</li><li>amazon aws SignatureDoesNotMatch</li><li>amazon api SignatureDoesNotMatch</li><li>amazon signaturedoesnotmatch error</li><li>SignatureDoesNotMatch mws</li></ul><div style='clear:both'></div>

<p>Related posts:<ol><li><a href='http://www.money-code.com/2009/09/finding-browsenodes-for-amazon-api-search-aws/' rel='bookmark' title='Finding BrowseNodes for Amazon API search (AWS)'>Finding BrowseNodes for Amazon API search (AWS)</a></li>
<li><a href='http://www.money-code.com/2009/08/understanding-the-amazon-product-advertising-api/' rel='bookmark' title='Understanding the Amazon Product Advertising API'>Understanding the Amazon Product Advertising API</a></li>
<li><a href='http://www.money-code.com/2008/01/how-to-search-amazons-catalog-with-amazons-associate-web-service/' rel='bookmark' title='How to search Amazon&#8217;s catalog with Amazon&#8217;s Associate Web Service'>How to search Amazon&#8217;s catalog with Amazon&#8217;s Associate Web Service</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.money-code.com/2009/08/amazon-product-api-signaturedoesnotmatch-error-response/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
