获取Dropbox-使用dropboxuploader.php登录时出现403错误 [英] Getting Dropbox - 403 error when logging on using dropboxuploader.php
问题描述
嘿,我正在使用dropboxuploader.php登录Dropbox。一切都很好,但是昨天我上班时,我无法连接了。这就是保管箱返回给我的东西。
Hey I'm using dropboxuploader.php to login into dropbox. All was working fine, but when i came into work yesterday i could no longer connect. This is what dropbox is returning to me.
HTTP/1.1 100 Continue
HTTP/1.1 403 Forbidden
Server: nginx/1.2.3
Date: Thu, 04 Oct 2012 08:44:36 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
似乎您试图做一些我们无法验证的事情。您是否在其他窗口中登录了另一个Dropbox帐户?尝试单击< a href =# onclick = history.go(-1);返回false;>此处< / a>
返回到您来自的页面,或者只是进入< a href = / home> home< / a>。
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 <a href="#" onclick="history.go(-1); return false;">here</a>
to go back to the page you came from, or just go <a href="/home">home</a>.
推荐答案
用以下代码替换登录功能,它应该可以正常工作:
Replace the login function with below code and it should work:
protected function login() {
$data = $this->request('https://www.dropbox.com/login');
$str = '<input type="hidden" name="t" value="';
$start = strpos($data,$str);
$val = "";
if($start !== false)
{
$val = substr($data,$start+strlen($str),24);
}
$data = $this->request('https://www.dropbox.com/login', true, array('login_email'=>$this->email, 'login_password'=>$this->password, 't'=>$val));
if (stripos($data, 'location: /home') === false)
throw new Exception('Login unsuccessful.');
$this->loggedIn = true;
}
这篇关于获取Dropbox-使用dropboxuploader.php登录时出现403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!