title: Amazon MWS submit feed flat file product reprice issue
body: <p>I'm having issue in repricing the product with php curl in amazon mws API, having error 
  Sender<Code>ContentMD5DoesNotMatch</Code>
  the Content-MD5 HTTP header you passed for your feed did not match the Content-MD5 we calculated for your feed4bad39e1-7479-4ebb-ae94-76e2eed742cb</p>
  
  <p>here is the complete code</p>
  
  <p>fwrite($write, "sku\tprice");</p>
  
  <pre><code>while($row = mysql_fetch_assoc($rsSql))
  {
      fwrite($write,"\n".$row['seller_sku']."\t".$row['current_price']);
  }
  
  fclose($write);
  
  $file = 'prices.tsv';
  $fo = fopen($file,'r');
  
  $httpHeader=array();
  $httpHeader[]='Transfer-Encoding: chunked';
  $httpHeader[]='Content-Type: text/tab-separated-values';
  $httpHeader[]='Content-MD5: ' . base64_encode(md5(trim($file)));
  $httpHeader[]='Expect:';
  $httpHeader[]='Accept:';
  
  $curl_options=array(
  CURLOPT_UPLOAD=&gt;true,
  CURLOPT_INFILE=&gt;$fo,
  CURLOPT_RETURNTRANSFER=&gt;true,
  CURLOPT_POST=&gt;true,
  // CURLOPT_PORT=&gt;443,
  // CURLOPT_SSLVERSION=&gt;3,
  CURLOPT_SSL_VERIFYHOST=&gt;false,
  CURLOPT_SSL_VERIFYPEER=&gt;false,
  CURLOPT_FOLLOWLOCATION=&gt;1,
  CURLOPT_PROTOCOLS=&gt;CURLPROTO_HTTPS,
  CURLINFO_HEADER_OUT=&gt;TRUE,
  CURLOPT_HTTPHEADER=&gt;$httpHeader,
  CURLOPT_CUSTOMREQUEST=&gt;'POST',
  CURLOPT_VERBOSE=&gt;true,
  // CURLOPT_HEADER=&gt;true,
  );
  
  
  $param = array();
  $param['AWSAccessKeyId']   = AWSKEY; 
  $param['Action']           = 'SubmitFeed'; //CHANGE THIS
  $param['SellerId']         = SELLERID; 
  $param['SignatureMethod']  = 'HmacSHA256';  
  $param['SignatureVersion'] = '2'; 
  $param['ContentMD5Value']  = base64_encode(md5(trim($file)));
  $param['Timestamp']        = gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time());
  $param['Version']          = '2009-01-01'; 
  $param['MarketplaceId']    = MARKETPLACE; 
  $param['FeedType']    = "_POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA_";
  $param['PurgeAndReplace']    = 'true';
  
  
  $secret = SECRETKEY;
  
  $url = array();
  foreach ($param as $key =&gt; $val) {
  
      $key = str_replace("%7E", "~", rawurlencode($key));
      $val = str_replace("%7E", "~", rawurlencode($val));
      $url[] = "{$key}={$val}";
  
  }
  
  sort($url);
  $arr = implode('&amp;', $url);
  
  $sign = 'POST' . "\n";
  $sign .= 'mws.amazonservices.com' . "\n";
  $sign .= '/Feeds/2009-01-01' . "\n";
  $sign .= $arr;
  
  $signature = hash_hmac("sha256", $sign, $secret, true);
  $signature = urlencode(base64_encode($signature));
  $link = "https://mws.amazonservices.com/Feeds/2009-01-01?";
  $link .= $arr . "&amp;Signature=" . $signature;
  
  $ch = curl_init($link);
  curl_setopt_array($ch,$curl_options);
  $response=curl_exec($ch);
  $info = curl_getinfo($ch);
  curl_close($ch);
  
  $xml = simplexml_load_string("$response");
  echo $response;
  </code></pre>