cURLとPHPを使用してユーザーとしてDropboxにログインしようとしています。
$ch = curl_init();
$data = array(
't'=>'hxdlvCcN7SKKcfKCvpEO8-s2',
'lhs_type'=>'anywhere',
'login_email'=>'myemail@mail.com',
'password'=>'mypass',
'login_submit'=>1,
'remember_me'=>'on',
'login_submit_dummy'=>'Sign in'
);
// set cURL options and execute
curl_setopt($ch, CURLOPT_URL, "https://www.dropbox.com/login?lhs_type=anywhere");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
$request_token_response = curl_exec($ch);
var_dump($request_token_response );
このテキストで403ページを取得します:
It seems you tried to do something we can't verify. Did you log into a different Dropbox account in a different window? Try clicking here to go back to the page you came from, or just go home.
私は何が間違っているのですか?