Is this possible to do with PHP?
I've found some scripts to force download single files, but not entire folders full of files.
This is the file downloading script I have
Code: Select all
<?php
$file = "filename.ext";
// Quick check to verify that the file exists
if( !file_exists($file) ) die("File not found");
// Force the download
header("Content-Disposition: attachment; filename=\"" . basename($file) . "\"");
header("Content-Length: " . filesize($file));
header("Content-Type: application/octet-stream;");
readfile($file);
?>Code: Select all
$file = "records/folder001";