2

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

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>.

5
  • Can you add the code? (double, see @GeertJaminon reply)
    – Rob
    Oct 5, 2012 at 10:01
  • $uploader = new DropboxUploader($_REQUEST['DropboxDetails']['Username'] , $_REQUEST['DropboxDetails']['Password'] ); $uploader->login(); Oct 5, 2012 at 12:06
  • In the code above all i'm doing is calling the login function in dropboxuploader.php Oct 5, 2012 at 12:07
  • I have issues with the login view of the iOS SDK since today resultier in 403. Could be related to forums.dropbox.com/topic.php?id=91259 . You might Post this in the dropbox dev forums, as well.
    – marcus
    Oct 6, 2012 at 10:45
  • Thanks Marcus, i posted here on forums.dropbox.com/topic.php?id=91285#post-501800 yesterday evening. Oct 6, 2012 at 11:02

2 Answers 2

1

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;
}
0
0

Just update your dropbox uploader file instead doing your fixes.

https://github.com/jakajancar/DropboxUploader

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.