This is the PHP code I am using to allow users to download a file:
$path = "somepath" header(\'Content-type: application\'); header(\'Content-Dispos