View Single Post
ישן 19-05-09, 16:46   # 3
yakar
חבר בקהילה
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
הודעות: 117

yakar לא מחובר  

ניסיתי להריץ קוד שנתנו פה בפורום בעבר וגם לא הציג לי כמה זמן נשאר ומה גודל הקובץ

הסקריפט הוא :
PHP קוד:
<?php 
$local_file 
"sol-nv-b99-x86-dvd-iso-a.zip"
$download_file "test.bin"
$download_rate "10"

    
// fix for IE catching or PHP bug issue 
    
header("Pragma: public"); 
    
header("Expires: 0"); // set expiration time 
    
header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
    
// force download dialog 
    
header("Content-Type: application/force-download"); 
    
header("Content-Type: application/octet-stream"); 
    
header("Content-Type: application/download"); 
    
// use the Content-Disposition header to supply a recommended filename and 
    // force the browser to display the save dialog. 
    
header("Content-Disposition: attachment; filename=".basename($download_file).";"); 
    
header("Content-Transfer-Encoding: binary"); 
    
header("Content-Length: ".filesize($local_file)); 


    
// open file stream 
    
$file fopen($local_file"r"); 
    while(!
feof($file)) { 
        
// send the current file part to the browser 
        
print fread($fileround($download_rate 1024)); 

        
// flush the content to the browser 
        
flush(); 

        
// sleep one second 
        
sleep(1); 
    } 
?>


יתכן שיש בעיה בphp 5 ?
  Reply With Quote