Direct File Download
The goal is to provide users with a file download, directly in a php script rather than a hard link on a remote filesystem. This allows us to implement user authentication prior to any files being available.
All of this will likely work, but so far is untested
<? $dir="/path/to/file/"; if (isset($_REQUEST["file"])) { $file=$dir.$_REQUEST["file"]; 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"); } else { echo "No file selected"; } ?>