2011-03-31 60 views
0

error如何支持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'; 
} 
+0

通过'IDM' MOD你指的是共享软件的应用“互联网下载管理器”? – drudge 2011-03-31 18:56:16

+0

是互联网下载管理器或任何其他下载加速器 – Khaled 2011-04-01 14:44:24

回答

0

使用xsendfile IDM。一种阿帕奇

https://tn123.org/mod_xsendfile/

+0

如何使用它的详细信息请 – Khaled 2011-04-02 04:22:20

+0

观看链接 – dynamic 2011-04-02 10:21:05

+0

我尝试了一步一步安装而不工作,有没有其他方法? – Khaled 2011-04-04 19:26:14