简体   繁体   English

使用php下载隐藏的Google云端硬盘数据

[英]Download Hidden Google Drive data with php

I'm trying to download hidden whatsapp data from Google Drive. 我正在尝试从Google云端硬盘下载隐藏的whatsapp数据。

Thanks to Tomers useful instructions here (Thanks!) I can see the data but I'm quite flummoxed how to download it. 由于Tomers有用的指示在这里 (谢谢!)我可以看到的数据,但我十分狼狈如何下载它。 My main problem is I can't identify a direct link and I can't get my head around the coding to request one. 我的主要问题是我无法识别直接链接,也无法理解编码来请求链接。

Many Thanks! 非常感谢!

Each file inside the hidden Google Drive directory has an ID, which you can see via $file->getId() . 隐藏的Google云端硬盘目录中的每个文件都有一个ID,您可以通过$file->getId()看到该ID。 (In my example you have linked, the ID is shown in parentheses next to each file name) Then, downloading the file should be as simple as (在我的例子,你有联系,在括号中显示的ID每个文件名旁)然后,下载的文件应尽可能简单

$fileId = '1kTFG5TmgIGTPJuVynWfhkXxLPgz32QnPJCe5jxL8dTn0';
$content = $service->files->get($fileId, array('alt' => 'media' ));
file_put_contents("result_file.crypt9",$content);

Also take a look at the documentation . 另请参阅文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM