php脚本生成直接链接的谷歌驱动器文件跳过病毒扫描警告?

时间:2018-03-27 21:12:35

标签: javascript php google-drive-api

php脚本生成直接链接的公共共享谷歌驱动器文件跳过病毒扫描警告 我创建了许多类似的文章,如

https://links-safety.com/drive/

https://linkstaker.com/drive/

它们完全相似 他们需要的只是ID,例如。 1C25uoL6nIqqNhex3wm8VwODsO2q2pXBt

https://links-safety.com/drive/i0yp6ymfgniv8lj1x6y8d7rj1

https://linkstaker.com/drive/download.php?id=86bc9a7559123e8982cf

他们没有使用api,因为文件网址与我们点击病毒扫描页面上的下载按钮按钮相同

1 个答案:

答案 0 :(得分:0)

如果您知道如何计算确认代码(此处为:CfLW),您可以将文件热链接如下: https://drive.google.com/uc?export=download&confirm=CfLW&id=1C25uoL6nIqqNhex3wm8VwODsO2q2pXBt

否则你可以通过首先下载警告页面并查找其中的热链接/确认码来获取热链接:

$input_lines = file_get_contents('https://drive.google.com/uc?id=1C25uoL6nIqqNhex3wm8VwODsO2q2pXBt&export=download');
preg_match_all("/confirm=([0-9A-Za-z]+)&/", $input_lines, $output_array);
$hotlink = 'https://drive.google.com/uc?export=download&confirm='.$output_array[1][0].'&id=1C25uoL6nIqqNhex3wm8VwODsO2q2pXBt