Note that there are some explanatory texts on larger screens.

plurals
  1. POHow Can I convert this ScratchPad Request Detail To PHP
    primarykey
    data
    text
    <pre><code>POST /Orders/2011-01-01?AWSAccessKeyId=MyAccessKey &amp;Action=ListOrders &amp;SellerId=SellerId &amp;SignatureVersion=2 &amp;Timestamp=2012-12-12T08%3A31%3A19Z &amp;Version=2011-01-01 &amp;Signature=MySignature &amp;SignatureMethod=HmacSHA256 &amp;CreatedAfter=2012-12-06T19%3A00%3A00Z &amp;MarketplaceId.Id.1=MyMarketID HTTP/1.1 Host: mws.amazonservices.co.uk x-amazon-user-agent: AmazonJavascriptScratchpad/1.0 (Language=Javascript) Content-Type: text/xml </code></pre> <p>I have tried to convert these request detail of amazon scratch pad to php curl but all in vain. any one know how to convert these.</p> <p>Below is code snipped not all but a part of code. Nothing is displaying</p> <pre><code> $params = array( 'AWSAccessKeyId' =&gt; AWS_ACCESS_KEY_ID, 'Action' =&gt; "ListOrders", 'SellerId' =&gt; MERCHANT_ID, 'SignatureMethod' =&gt; "HmacSHA256", 'SignatureVersion' =&gt; "2", 'Timestamp'=&gt; gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time()), 'Version'=&gt; "2011-10-01", 'MarketplaceId' =&gt; MARKETPLACE_ID, ); // Sort the URL parameters $url_parts = array(); foreach(array_keys($params) as $key) $url_parts[] = $key . "=" . str_replace('%7E', '~', rawurlencode($params[$key])); sort($url_parts); // Construct the string to sign $url_string = implode("&amp;", $url_parts); $string_to_sign = "POST\nmws.amazonservices.co.uk\n/Orders/2011-10-01\n" . $url_string; // Sign the request $signature = hash_hmac("sha256", $string_to_sign, AWS_SECRET_ACCESS_KEY, TRUE); //Base64 encode the signature and make it URL safe $signature = urlencode(base64_encode($signature)); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 15); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); $response = curl_exec($ch); var_dump($response); </code></pre> <p>Curl GetInfo</p> <pre><code>[content_type] =&gt; [http_code] =&gt; 0 [header_size] =&gt; 0 [request_size] =&gt; 0 [filetime] =&gt; 0 [ssl_verify_result] =&gt; 0 [redirect_count] =&gt; 0 [total_time] =&gt; 0 [namelookup_time] =&gt; 0 [connect_time] =&gt; 0 [pretransfer_time] =&gt; 0 [size_upload] =&gt; 0 [size_download] =&gt; 0 [speed_download] =&gt; 0 [speed_upload] =&gt; 0 [download_content_length] =&gt; -1 [upload_content_length] =&gt; -1 [starttransfer_time] =&gt; 0 [redirect_time] =&gt; 0 [certinfo] =&gt; Array ( ) [primary_ip] =&gt; [primary_port] =&gt; 0 [local_ip] =&gt; [local_port] =&gt; 0 [redirect_url] =&gt; ) </code></pre> <p>URL </p> <pre><code>https://mws.amazonservices.co.uk/Orders/2011-01-01?AWSAccessKeyId=myaccesskey&amp;Action=ListOrders&amp;CreatedAfter=2012-12-06T19%253A00%253A00Z&amp;MarketplaceId.Id.1=marketplaceiddumy&amp;SellerId=selleriddummy&amp;SignatureMethod=HmacSHA256&amp;SignatureVersion=2&amp;Timestamp=2012-12-12T13%3A16%3A56.000Z&amp;Version=2011-10-01&amp;Signature=lXaoVq1n4b0gAmoMg69jnSCqHWC6C6hlbEfTtrHX2i0%3D </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload