I'm trying to create a Webapp which can read the user's Dropbox files. If it helps to answer the question, I request the username and password. I've been searching and I found in Google Code a library using OAuth to access all the data in the user's Dropbox.
My problem is that I don't have OAuth installed in the server. I need to install it but I don't have physical access to the server nor the php.ini file, so I'm not able too.
My question is if I can install it or at least simulate it uploading some files (which I can use like a class) to my directory, or if there's some other way rather than calling to the Host and tell them to install it, if possible.
If there's a way to access to the php.ini file and modify it to add the OAuth extension, or if it can be done via .htaccess (as the last chance) it will help too.
Thanks.
Edit: The error I get is: Uncaught exception 'Dropbox_Exception' with message 'The OAuth class could not be found! Did you install and enable the oauth extension?'
You don't need to use the OAuth extension, you can do just fine by bundling any library that implements OAuth.
The OAuth site has several options listed on their site. Not only for PHP but for a variety of languages.
The documentation for the dropbox library that you're using, states:
The library makes use of OAuth. At the moment you can use either of these libraries:
- PHP OAuth extension
- PEAR's HTTP_OAUTH package
The extension is recommended, but if you can't install php extensions you should go for the pear package.
Since you can't install the php extension, then download the HTTP OAUTH library.
Inside the folder "HTTP" are the files that you need, so you can include it manually.
OAuth is a protocol. Like there are trackers and clients (seeds and peers) over the Bittorrent protocol, there are service providers (Dropbox here) and consumers (your app) over the OAuth protocol.
You need a library that implements OAuth, like @pablasso says.
(Pardon my comparison of a P2P and a client-server)
OAuth-php implements server and client side of OAuth. I have written both server and client with this library. The client can be configured to use (only) the $_SESSION store.
http://code.google.com/p/oauth-php/
But you may suffer from the confusing documentation, even though you can write the entire client in 100 lines. Do check out the included client examples.
You also need the CURL extension on your server for making HTTP requests to DropBox.
You may also need basic understanding of the Protocol workflow.
http://oauth.net/core/1.0a/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With