打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Linux全自动备份网站到百度云盘
bpcs_uploader,利用bpcs_uploader你可以动将VPS主机上的文件上传到百度网盘中,同时也可以从百度网盘中下载文件到VPS主机上,让你的文件安全地“住”在百度云中。百度云空间容量大,且有了百度这个靠山,日后也不必担心网盘关门走人,随着众多国内网盘开始投放大量的广告到网盘下载页面(典型的有华为网盘、下载赚钱网盘),百度网盘清爽的风格就显得难能可贵了。将文件上传到百度云中就可以方便其它用户下载
 
1.安装wdcp
wget http://down.wdlinux.cn/in/lanmp_wdcp_ins.sh
sh lanmp_wdcp_ins.sh
 
2.下载bpcs_uploader上传脚本
https://github.com/oott123/bpcs_uploader/tarball/master
chmod +x bpcs_uploader.php执行权限
 
3.查看php路径
/www/wdlinux/nginx_php-5.2.17/bin/php –v
bpcs_uploader.php第一行修改成
#!/www/wdlinux/nginx_php-5.2.17/bin/php -ddisable_functions -d safe_mode=Off
  1. [root@VM_166_159_centos oott123-bpcs_uploader-3a75324]# ./bpcs_uploader.php quickinit
  2. ===========================Baidu PCS Uploader===========================
  3. Usage: ./bpcs_uploader.php init|quickinit|quota
  4. Usage: ./bpcs_uploader.php upload|download path_local path_remote
  5. Usage: ./bpcs_uploader.php delete path_remote
  6. Usage: ./bpcs_uploader.php uploadbig path_local path_remote [slice_size(default:1073741824)]                                                                                                                                                  [temp_dir(def:/tmp/)]
  7. Usage: ./bpcs_uploader.php fetch path_remote path_to_fetch
  8. ========================================================================
  9. Uploader initialization will be begin. If you have already configured the uploader before, y                                                                                                                                                 our old settings will be overwritten.
  10. Continue? [y/N] y
  11.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  12.                                  Dload  Upload   Total   Spent    Left  Speed
  13. 171   263    0   263    0    80    671    204 --:--:-- --:--:-- --:--:--  3210
  14. Launch your favorite web browser and visit https://openapi.baidu.com/device
  15. Input 2a24n8dv as the user code if asked.
  16. After granting access to the application, come back here and press Enter to continue.

  17.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  18.                                  Dload  Upload   Total   Spent    Left  Speed
  19. 244   101    0   101    0   143    531    753 --:--:-- --:--:-- --:--:--     0
  20. OAuth error authorization_pending : User has not yet completed the authorization
  21. Authentication failed. Please check the error message and try again.
  22. Launch your favorite web browser and visit https://openapi.baidu.com/device
  23. Input 2a24n8dv as the user code if asked.
  24. After granting access to the application, come back here and press Enter to continue.
  25. Continue? [y/N] y
  26.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  27.                                  Dload  Upload   Total   Spent    Left  Speed
  28. 244   101    0   101    0   143    546    773 --:--:-- --:--:-- --:--:--     0
  29. OAuth error authorization_pending : User has not yet completed the authorization
  30. Authentication failed. Please check the error message and try again.
  31. Launch your favorite web browser and visit https://openapi.baidu.com/device
  32. Input 2a24n8dv as the user code if asked.
  33. After granting access to the application, come back here and press Enter to continue.
  34. Continue? [y/N] y
  35.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  36.                                  Dload  Upload   Total   Spent    Left  Speed
  37. 180   397    0   397    0   143   2162    778 --:--:-- --:--:-- --:--:--  5772
  38.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  39.                                  Dload  Upload   Total   Spent    Left  Speed
  40.   0    66    0    66    0     0    220      0 --:--:-- --:--:-- --:--:--   366
  41. Access Granted. Your Storage Status: 105.95G/2063.00G (5.14%)
  42. Enjoy!
以上为快速初始化代码,输入授权码网址:https://openapi.baidu.com/device 
 
1.
  1. 然后打开浏览器访问 https://openapi.baidu.com/device ,在“请输入设备上显示的用户授权码:”文本框中输入上面显示的授权码,并点击继续。 看到网页上显示“请返回设备继续操作!”后,返回ssh上按下回车后,即完成了初始化配置
  2. 重新分配

  3. [root@VM_166_159_centos oott123-bpcs_uploader-3a75324]# ./bpcs_uploader.php init
  4. ===========================Baidu PCS Uploader===========================
  5. Usage: ./bpcs_uploader.php init|quickinit|quota
  6. Usage: ./bpcs_uploader.php upload|download path_local path_remote
  7. Usage: ./bpcs_uploader.php delete path_remote
  8. Usage: ./bpcs_uploader.php uploadbig path_local path_remote [slice_size(default:1073741824)] [temp_dir(def:/tmp/)]
  9. Usage: ./bpcs_uploader.php fetch path_remote path_to_fetch
  10. ========================================================================
  11. Uploader initialization will be begin. If you have already configured the uploader before, your old settings will b                                                                                                                          e overwritten.
  12. Continue? [y/N] y
  13. Please enter your PSC App API Key. You can get this key by visiting http://developer.baidu.com/dev#/create
  14. If you have already created an app, you can visit http://developer.baidu.com/console#/app and get it in your app's                                                                                                                           info.
  15. If you don't want to bother creating an app, you can press Enter to use the demo API Key.
  16. Doing so (without your own API Key/Secret) will cause the access-token to expire every 30 days, and you'll have to
  17. re-initialize when it expires.
  18. App API KEY [uFBSHEwWE6DD94SQx9z77vgG] :uFBSHEwWE6DD94SQx9z77vgG
  19. App API Key has been set to uFBSHEwWE6DD94SQx9z77vgG .
  20. Demo key detected. Using default API Secret.
  21. Demo key detected. Using default app name.
  22.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  23.                                  Dload  Upload   Total   Spent    Left  Speed
  24. 171   263    0   263    0    80   1355    412 --:--:-- --:--:-- --:--:--  3452
  25. Launch your favorite web browser and visit https://openapi.baidu.com/device
  26. Input axmhkper as the user code if asked.
  27. After granting access to the application, come back here and press Enter to continue.

  28.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  29.                                  Dload  Upload   Total   Spent    Left  Speed
  30. 179   395    0   395    0   143   2010    727 --:--:-- --:--:-- --:--:--  5250
  31.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  32.                                  Dload  Upload   Total   Spent    Left  Speed
  33.   0    67    0    67    0     0    294      0 --:--:-- --:--:-- --:--:--   690
  34. Access Granted. Your Storage Status: 105.95G/2063.00G (5.14%)

 
4.我们测试上传文件
        
  1. ./bpcs_uploader.php upload /www/jiaoguan.txt /www/jiaoguan.                                                                                                                          txt
  2. ===========================Baidu PCS Uploader===========================
  3. Usage: ./bpcs_uploader.php init|quickinit|quota
  4. Usage: ./bpcs_uploader.php upload|download path_local path_remote
  5. Usage: ./bpcs_uploader.php delete path_remote
  6. Usage: ./bpcs_uploader.php uploadbig path_local path_remote [slice_size(default:1073741824)] [temp_dir(def:/tmp/)]
  7. Usage: ./bpcs_uploader.php fetch path_remote path_to_fetch
  8. ========================================================================
  9.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  10.                                  Dload  Upload   Total   Spent    Left  Speed
  11. 197   397    0   397    0   195   1791    880 --:--:-- --:--:-- --:--:--  2767
  12.   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
  13.                                  Dload  Upload   Total   Spent    Left  Speed
  14. 131   394  185   185  104   209    242    274 --:--:-- --:--:-- --:--:--   337
  15. File /apps/bpcs_uploader//www/jiaoguan.txt uploaded.
  16. Size:0.019K MD5 Sum:a19e55943b85fe27417653593b6c80e4
测试完工!WDCP自动化运维脚本将于明天发布!
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
百度网盘上传脚本bpcs_uploader
Claroline e-Learning = 1.6 Remote Hash SQL Injection Perl Exploit
php图片上传代码
简单PHP上传图片、删除图片实现代码
php文件上传
PHP图片上传的一个例子
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服