1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Amazon Product Advertising API Signature - PHP

Discussion in 'Amazon' started by myhart, Jun 3, 2009.

  1. myhart

    myhart Peon

    Messages:
    228
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #41
    Looks like Amazon finally pulled the plug on API requests without a signature?
     
    myhart, Aug 19, 2009 IP
  2. markowe

    markowe Well-Known Member

    Messages:
    1,136
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    165
    #42
    Have they? Seen any definite proof of this? Well, all my stuff is working fine, knock on wood, which hopefully means my updates were successful, if they have indeed enforced the new protocol.

    I am surprised, though, if they did not extend the deadline a little. I can imagine a massive slump in affiliate traffic happening - there must be thousands of people out there who set up and left AOM, APF and other Amazon scripts running, with no clue about the changes...
     
    markowe, Aug 19, 2009 IP
  3. myhart

    myhart Peon

    Messages:
    228
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #43
    No definite proof however the test pages I left up wthout the API signature are not working today. I guess Amazon could be just giving another warning shot to get the API product signatures added to the requests? However as the 15th of August has passed I doubt that this just is a warning!
     
    myhart, Aug 19, 2009 IP
  4. markowe

    markowe Well-Known Member

    Messages:
    1,136
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    165
    #44
    Oh, well, that sounds "definite" enough for me :)

    Funny that the date came and went without fanfare... You'd think there'd have been a few more, increasingly dire warnings first!

    I appear to have made some sales since the 15th, so something is working right...
     
    markowe, Aug 19, 2009 IP
  5. tntgang

    tntgang Member

    Messages:
    237
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    45
    #45
    They did extend it a little My pages were working fine yesterday now today the products dont show at all.
     
    tntgang, Aug 19, 2009 IP
  6. yuyo

    yuyo Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #46
    Anyone has AUTO ESTORE, i have one but i don't know how to get the api signature so my site is down..

    any help please post it here....

    bless
     
    yuyo, Aug 19, 2009 IP
  7. Juggernuat

    Juggernuat Guest

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #47
    Thank Alls Rep.
     
    Juggernuat, Aug 19, 2009 IP
  8. markowe

    markowe Well-Known Member

    Messages:
    1,136
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    165
    #48
    I'd never heard of it before, but I see they have not bothered to update their script, even their own demo store is not working: http://leather-case.info/.

    Unfortunately, there are a lot of people out there willing to charge $99 for their script (reduced from $149, don't you know!) but not so willing to provide technical support for it. That's why I give my script away for free...

    Not much you can do, other than contact the authors and hassle them - there is a promo thread on "another forum" and you might be able to contact the author that way.
     
    markowe, Aug 20, 2009 IP
  9. yuyo

    yuyo Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #49
    anyone can help me to get the amazon api request installed in my store...
    thanks
     
    yuyo, Aug 23, 2009 IP
  10. myhart

    myhart Peon

    Messages:
    228
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #50
    What script does your store use? If it's written with PHP I may be able to help.
     
    myhart, Aug 24, 2009 IP
  11. nas80

    nas80 Greenhorn

    Messages:
    73
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #51
    Yes.. I experienced the same problem. My site went blank without content. But, the problem closed when I use API signature in my request. I've to do several changes to my script. And thanks to you, my site is working fine now..:)
     
    Last edited: Aug 24, 2009
    nas80, Aug 24, 2009 IP
  12. busanamuslim

    busanamuslim Guest

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #52
    @myhart: I downloaded the new ASM2 with this signature thing inside. Notice about the changes in config.php and in aws4class.php. But I can't make it works.
    Any suggestions perhaps?
     
    busanamuslim, Sep 8, 2009 IP
  13. myhart

    myhart Peon

    Messages:
    228
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #53
    I wasn't aware that Roger had updated ASM2 . So I downloaded the "New" ASM2 with API signature code and added my AWSAccessKeyId and SecretAccessKey. The result was that my test store seems to work fine.

    What kind of problem do you have? Also the URL to your store might be of help in troubleshooting.
     
    myhart, Sep 8, 2009 IP
  14. busanamuslim

    busanamuslim Guest

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #54
    @myhart:
    No result. On my site, if no result from Amazon.com I display welcomemsg.tpl.
    (I can't post the link of my site yet)

    In config.php I put $SubscriptionID and $SecretAccessKey, while under function xmlquery($url) in aws4class.php the parameter $SecretAccessKey = "";

    Did I do wrong?
     
    busanamuslim, Sep 9, 2009 IP
  15. myhart

    myhart Peon

    Messages:
    228
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #55
    With the new version of ASM2 that I downloaded you add your AWSAccessKeyId and SecretAccessKey in the config.php file. You don't need to add anything to the aws4class.php file.
     
    myhart, Sep 9, 2009 IP
  16. busanamuslim

    busanamuslim Guest

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #56
    Thanks myhart, I will check it again. Will back to you too.
     
    busanamuslim, Sep 10, 2009 IP
  17. busanamuslim

    busanamuslim Guest

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #57
    Still doesn't work, no results :-(.

    In config.php I put both AWSAccessKeyId and SecretAccessKey (I delete my SubscriptionID). While I don't change anything in aws4class.php. Below is part of the xmlquery($url) function of aws4class.php. Do you see any error in this part?

    function xmlquery($url){
    // BEGIN: API
    $SecretAccessKey = "";
    $String = rawurldecode($url);
    $String = str_replace("%7E", "~", $String);
    $String = preg_replace('/[\r\n\" "]/', '', $String);
    $String = preg_replace('#Keywords=(.*?)&([A-Za-z]+)=#e', '"Keywords=".preg_replace("/[^0-9a-zA-Z]/"," ","$1")."&".$2."=";', $String);
    $String = preg_replace('/[" "]+/', ' ', $String);
    $StringArray = explode( '?', $String, 2);
    $Parameters = explode("&", $StringArray[1]);
    $Parameters[] = "Timestamp=" .gmdate("Y-m-d\TH:i:s\Z");
    asort($Parameters);
    $NewString = implode("&", $Parameters);
    $NewString = rawurlencode($NewString);
    $NewString = str_replace("~", "%7E", $NewString);
    $NewString = str_replace("%3D", "=", $NewString);
    $NewString = str_replace("%26", "&", $NewString);
    $url = parse_url($StringArray[0]);
    $PrependString = "GET\n" .$url['host']. "\n" .$url['path']. "\n" .$NewString;
    $Signature = base64_encode(hash_hmac("sha256", $PrependString, $SecretAccessKey, True));
    $Signature = rawurlencode($Signature);
    $url = $StringArray[0]. "?" . $NewString . "&Signature=" .$Signature;
    // END: API
     
    busanamuslim, Sep 10, 2009 IP
  18. myhart

    myhart Peon

    Messages:
    228
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #58
    Below is the signature code that was included in the ASM2 aws4class.php file that I recently downloaded. You might try using it or replacing the aws4class.php file altogether with the newest version.

    // Add API Signature Code Here
    			$String = preg_replace('/[\r\n\" "]/', '', $url);
    			$SecretAccessKey = "";
    			$StringArray = explode( '?', $String);
    			$ValueStringArray = explode("&", $StringArray[1]);
    			$ValueStringArray[] = "Timestamp=" .gmdate("Y-m-d\TH:i:s\Z");       
    			asort($ValueStringArray);
    			$NewString = implode("&", $ValueStringArray);
    			$NewString = rawurlencode($NewString);
    			$NewString = str_replace("%3D", "=", $NewString);
    			$NewString = str_replace("%26", "&", $NewString);
    			$NewString = str_replace("%7E", "~", $NewString);
    			$url = parse_url($StringArray[0]);
    			$PrependString = "GET\n" .$url['host']. "\n" .$url['path']. "\n" .$NewString;
    			$Signature = base64_encode(hash_hmac("sha256", $PrependString, $this->SecretAccessKey, True));
    			$Signature = rawurlencode($Signature);
    			$Signature = str_replace("%7E", "~", $Signature);
    			$url = $StringArray[0]. "?" . $NewString . "&Signature=" .$Signature;
    			// End of API Signature Code
    
    Code (markup):
     
    myhart, Sep 11, 2009 IP
  19. kung999

    kung999 Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #59
    thank you i try do this
     
    kung999, Sep 11, 2009 IP
  20. busanamuslim

    busanamuslim Guest

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #60
    @myhart: Still doesn't work, though I did these:
    - In config.php I put my SubscriptionID and my SecretAccessKey correctly, while let $AWSAccessKeyId empty;
    - Replacing the aws4class.php file altogether with the newest version;

    FYI, I've been managing tens of ASM stores since 2004 and they all worked well prior to 15 August 2009 period. Now all of them don't work anymore. No error messages resulted but "No Data Found" message produced by browsepage.php.

    Any thoughts, perhaps?
     
    busanamuslim, Sep 11, 2009 IP