2014-01-08 39 views

回答

0

我不確定我完全理解您的問題,但我認爲答案是「亞馬遜產品API中的數據只能通過'簽名'網址獲得。這樣,亞馬遜可以將濫用等追溯到源頭(即簽名者)。

如果可以通過「靜態」URL獲取數據,那麼您可以在整個互聯網上發佈該URL,任何人都可以在不註冊Amazon的情況下獲取數據。這是他們的數據,他們有使用規則,所以不會隨他們飛。

也就是說,您通常可以在將來(幾個月甚至幾年)創建帶有時間戳的網址。但是你仍然要對它的使用/濫用負責。

1

這是從這個url

include('aws_signed_request.php'); 

$public_key = 'xxxxxxxx'; 
$private_key = 'xxxxxxxxxx'; 
$associate_tag = 'xxxxxx'; 

$keywords= 'PHP'; 
$search_index = 'Books';  


// generate signed URL 
$request = aws_signed_request('com', array(
      'Operation' => 'ItemSearch', 
      'Keywords' => "Php Books", 
      "SearchIndex" => "Books", 
      "Count" => '24',     
      'ResponseGroup' => 'Large,EditorialReview'), $public_key, $private_key, $associate_tag);  




// do request (you could also use curl etc.) 
$response = @file_get_contents($request); 

文檔URL HERE

+0

嗯亞馬遜產品的動態搜索

下載aws_signed_request.php ..由於某種原因,我不能得到的XML在頁面中回顯。我試圖添加echo $ response;但那似乎沒有帶回任何東西? – AAA

+0

嘗試print_r($ response) –

+0

還是什麼......只是一個空白頁面 – AAA