I want to let my web visitors download a file. After a validation process, I use the code below for them to download the file. It seems to take a long time before the download starts and I was wondering if I am missing something that could make it quicker. Also, does anyone know of any security issues with this type of script and where the file is saved on the hard drive? Thanks... Ronnie
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize("$fileserver_path/$req_file"));
header('Content-Disposition: attachment; filename=' . $req_file);
readfile("$fileserver_path/$req_file");
exit;
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize("$fileserver_path/$req_file"));
header('Content-Disposition: attachment; filename=' . $req_file);
readfile("$fileserver_path/$req_file");
exit;