Ik heb de volgende code (PHP):
Maar, als ik het instuur krijg ik een foutmelding terug:
The request signature we calculated does not match the signature you provided.
Check your AWS Secret Access Key and signing method.
Ik heb geen idee wat nu te doen.
Weet iemand wat nu te doen?
Ik gebruik het script om album covers op te halen voor mijn persoonlijke cd collectie.
Als iemand daar dus een oplossing voor heeft hou ik me aanbevolen.
Thanks already!
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| $SearchIndex='Music'; $Keywords=urlencode($artist.' '.$album); $Operation = "ItemSearch"; $Version = "2009-03-31"; $ResponseGroup = "ItemAttributes,Images"; $Timestamp = gmdate("Y-m-d\TH:i:s\Z"); $request= " http://ecs.amazonaws.com/onca/xml" . "?Service=AWSECommerceService" . "&AssociateTag=" . Associate_tag . "&AWSAccessKeyId=" . Access_Key_ID . "&Operation=" . $Operation . "&Version=" . $Version . "&SearchIndex=" . $SearchIndex . "&Keywords=" . $Keywords . "&ResponseGroup=" . $ResponseGroup . "&Timestamp=" . $Timestamp; // create the string to sign $string_to_sign = "GET"."\n".$request; // calculate HMAC with SHA256 and base64-encoding $signature = base64_encode(hash_hmac("sha256", $string_to_sign, $private_key, True)); // encode the signature for the request $signature = str_replace("%7E", "~", rawurlencode($signature)); // create request again $request = $request."&Signature=".$signature; $response = file_get_contents($request); |
Maar, als ik het instuur krijg ik een foutmelding terug:
The request signature we calculated does not match the signature you provided.
Check your AWS Secret Access Key and signing method.
Ik heb geen idee wat nu te doen.
Weet iemand wat nu te doen?
Ik gebruik het script om album covers op te halen voor mijn persoonlijke cd collectie.
Als iemand daar dus een oplossing voor heeft hou ik me aanbevolen.
Thanks already!