PHP脚本生成Google驱动器文件的直接链接,跳过病毒扫描警告? [英] php script to generate direct links of google drive files skipping virus scan warning?

查看:147
本文介绍了PHP脚本生成Google驱动器文件的直接链接,跳过病毒扫描警告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

php脚本可生成公共共享的Google驱动器文件的直接链接,从而跳过病毒扫描警告 我建立了许多类似的记录,例如

php script to generate direct links of publicly shared google drive files skipping virus scan warning I founded many similar scrips doing so like

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

https://linkstaker.com/drive/

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

they are exactly similar what they reqire is only ID eg. 1C25uoL6nIqqNhex3wm8VwODsO2q2pXBt

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

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

它们未使用api,因为文件url与我们单击病毒扫描页面上的无论如何"下载按钮一样

they are not using api as the file url is just same as we click on download anyway button on virus scan page

推荐答案

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

If you know how to calculate the confirm code (here: CfLW), you can hotlink the file like this: https://drive.google.com/uc?export=download&confirm=CfLW&id=1C25uoL6nIqqNhex3wm8VwODsO2q2pXBt

否则,您可以通过首先下载警告页面并在其中查找热链接/确认代码来获得热链接:

Otherwise you can get the hotlink by first downloading the warning page and looking for the hotlink/confirmation code inside that:

$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

这篇关于PHP脚本生成Google驱动器文件的直接链接,跳过病毒扫描警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆