Upload website + database to dropbox with PHP

烈酒焚心 提交于 2019-12-03 21:17:51

Yes it is, have a look at the dropbox-php.

Example Code from the documentation:

/* Please supply your own consumer key and consumer secret */
$consumerKey = '';
$consumerSecret = '';

include 'Dropbox/autoload.php';

session_start();
$oauth = new Dropbox_OAuth_PHP($consumerKey, $consumerSecret);

// If the PHP OAuth extension is not available, you can try
// PEAR's HTTP_OAUTH instead.
// $oauth = new Dropbox_OAuth_PEAR($consumerKey, $consumerSecret);

$dropbox = new Dropbox_API($oauth);

$dropbox->putFile('newPath.txt','/local/path/tofile');

Yep, that is possible. You need the solution from Lars and a webserver for your dropbox, check https://github.com/louissobel/Drapache

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!