Dropbox Uploader

About

Dropbox Uploader is a PHP class which can be used to upload files to Dropbox, an online file synchronization and backup service.

You can use it to add a file upload form to your webpage which uploads files to your dropbox. The example page is a good start; just remove the email/password/destination fields and hardcode the respective values.

Another possibility is to create an email-to-dropbox gateway using procmail or something similar.

If you have too much time on your hands, you can even create a service to offer the above to non-technical persons.

Usage

require 'DropboxUploader.php';

$uploader = new DropboxUploader('email@address.com', 'password');
$uploader->upload('path/to/a/file.txt');

For a more complete usage example, see this page.

License

Dropbox Uploader is licensed under the MIT License.

Download

Current version: Dropbox Uploader 1.1.5

Trobleshooting

I'm getting the following error: Error: Cannot execute request: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

This means that the certificate of the Certification Authority (CA) that Dropbox uses for their SSL certificates is not installed on your system or PHP/cURL is not configured correctly to find it.

If you ARE the system administrator, try installing the CA certificates bundle to a system-wide location. If you use a package management system, this will ensure that they are kept up to date automatically. On Debian Linux for example, you can install the package ca-certificates.

If you are NOT the system administrator, you can download just the needed certificate and point DropboxUploader to it (before calling the upload() method):

$uploader->setCaCertificateFile("path/to/the/certificate.cer");

Version history

1.1.5

1.1.4

1.1.3

1.1.2

1.1.1

Added support for setting custom CA certificate file path.

1.1.0

Fixed uploader to be compatible with the redesigned web interface. Added host id login. You may now log in using your username and password or only your host id.

1.0.1

Destination directory support. Improved error reporting.

1.0.0

Initial release.