<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_65558"> <div class="blockcode"> <div id="code_vg2"><ol><li><?php<li> /* set here a limit of downloading rate (e.g. 10.20 Kb/s) */<li> $download_rate = 10.20;<li> <li> $download_file = 'download-file.zip'; <li> $target_file = 'target-file.zip';<li> <li> if(file_exists($download_file)){<li> /* headers */<li> header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');<li> header('Cache-control: private');<li> header('Content-Type: application/octet-stream');<li> header('Content-Length: '.filesize($download_file));<li> header('Content-Disposition: filename='.$target_file);<li> <li> /* flush content */<li> flush();<li> <li> /* open file */<li> $fh = @fopen($download_file, 'r');<li> while(!feof($fh)){<li> /* send only current part of the file to browser */<li> print fread($fh, round($download_rate * 1024));<li> /* flush the content to the browser */<li> flush();<li> /* sleep for 1 sec */<li> sleep(1);<li> }<li> /* close file */<li> @fclose($fh);<li> }else{<li> die('Fatal error: the '.$download_file.' file does not exist!');<li> }<li> ?></li></ol></div> <em onclick="copycode($('code_vg2'));">复制代码</em> </div> <br> </td></tr></table> <div class="ptg mbm mtn"> 다운로드 속도, PHP</div> <div id="comment_65558" class="cm"> </div> <div id="post_rate_div_65558"></div> <br><br>