Code:
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-Length: ".filesize("../$file"));
header("Content-Disposition: attachment; filename=\"".basename($file)."\"");
readfile("../$file") or die ("File read error");
exit;
header("Content-Type: application/force-download");
header("Content-Transfer-Encoding: Binary");
header("Content-Length: ".filesize("../$file"));
header("Content-Disposition: attachment; filename=\"".basename($file)."\"");
readfile("../$file") or die ("File read error");
exit;
1. Koliko to opterecuje server? U pitanju ce nekad biti fajlovi od po nekoliko stotina MB pa ne bi bas hteo da mi server puca ili sta vec...
2. Kako mogu u tom slucaju (posto sve ide preko HTTPD-a) da pratim "zauzetost" servera, ogranicim broj downloada i sl?