Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $file = "file.rar";
- $speed = 50; // מהירות הורדה
- 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" . "%20");
- flush();
- $fd = fopen($file, "r");
- while(!feof($fd)) {
- echo fread($fd, round($speed*1024));
- flush();
- sleep(1);
- }
- fclose ($fd);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement