<?php
$dosya = "dosya.zip"; // Dosya adı
$hiz = 50; // Burda hız sınırı koymak istediğin Kbps değer. Ben 50 KB/sn verdim.
if(file_exists($dosya) && is_file($dosya)) {
header("Cache-control: private");
header("Content-Type: application/octet-stream");
header("Content-Length: ".filesize($dosya));
header("Content-Disposition: filename=$dosya" . "%20");
flush();
$fd = fopen($dosya, "r");
while(!feof($fd)) {
echo fread($fd, round($hiz*1024)); // $hiz değişkenine bağlı olarak indirmeyi ayarlıyoruz
flush();
sleep(1);
}
fclose ($fd);
}
?>
güzel kod arşive attım. ama rapidshare,netload gibi sitelerin böyle birşey yaptıklarını zannetmiyorum.