0
我想使用Guzzle在亞馬遜上登錄,但我沒有運氣。這裏是我的代碼:如何使用Guzzle在亞馬遜上登錄PHP
$client = new \GuzzleHttp\Client(['cookies' => true]);
$response = $client->request('POST', 'https://www.amazon.com/gp/sign-in.html', [
'form_params' => [
'ap_email' => "[email protected]",
'ap_password' => "12345678"
]
]);
當我得到它$response->getBody()->getContents()
響應返回登錄頁面而不是重定向頁面時成功loged
許多網站可阻止在登錄頁面以外的任何位置發佈表單,特別是登錄表單。通過[CSRF令牌](https://en.wikipedia.org/wiki/Cross-site_request_forgery#Prevention)。您可能無法以這種方式與亞馬遜互動。你的目標是什麼? – Chris
@Chris謝謝您的評論。我想要登錄亞馬遜,以便能夠從評論者處獲得電子郵件(亞馬遜現在要求您先登錄以查看電子郵件) – robot11
我可以看到亞馬遜檢查了太多東西。例如:appActionToken,appAction,openid.pape.max_auth_age,openid.return_to,metadata1,..... –