Php 如何在不允许请求页面两次的情况下支持IDM

Php 如何在不允许请求页面两次的情况下支持IDM,php,download,accelerator,Php,Download,Accelerator,如上图所示,我在尝试从我的站点下载IDM文件时遇到了这个错误。仅在输入验证码后请求此页面一次的限制,如果再次请求页面,则必须再次输入验证码 在这种情况下如何支持IDM 下载代码如下所示 $file='test.mp3'; $download_rate = 50; //50 kb/s if(file_exists($file) && is_file($file)) { header('Cache-control: private'); header('Content-Type:

如上图所示,我在尝试从我的站点下载IDM文件时遇到了这个错误。仅在输入验证码后请求此页面一次的限制,如果再次请求页面,则必须再次输入验证码

在这种情况下如何支持IDM

下载代码如下所示

$file='test.mp3'; $download_rate = 50; //50 kb/s if(file_exists($file) && is_file($file)) { header('Cache-control: private'); header('Content-Type: application/octet-stream'); header('Content-Length: '.filesize($file)); header('Content-Disposition: filename='.$file); flush(); $file = fopen($file, "r"); while(!feof($file)) { // send the current file part to the browser print fread($file, round($download_rate * 1024)); // flush the content to the browser flush(); // sleep one second sleep(1); } fclose($file); } else { echo 'File Not Found'; } $file='test.mp3'; $download_rate=50//50kb/s 如果(文件存在($file)&&is_文件($file)) { 标头('Cache-control:private'); 标题(“内容类型:应用程序/八位字节流”); 标题('Content-Length:'.filesize($file)); 标题('Content-Disposition:filename='。$file); 冲洗(); $file=fopen($file,“r”); 而(!feof($file)) { //将当前文件零件发送到浏览器 打印fread($file,round($download_rate*1024)); //将内容刷新到浏览器 冲洗(); //睡一会儿 睡眠(1); } fclose($文件); } 否则{ 回显“未找到文件”; }
使用xsendfile。apache的mod


By
IDM
您是指共享软件应用程序“Internet下载管理器”吗?是的,Internet下载管理器或任何其他下载加速程序或如何使用它的详细信息请我通过逐步安装尝试,但不起作用,是否有其他方法?