Page is a not externally linkable
dmorison - 2:19 pm on Jul 14, 2011 (gmt 0)
Hi Ted,
That's exactly the header to use.
Let's say you know the original filename as $filename, and the path to the hashed copy as $hashed_filename, you could serve it with the original filename as follows:
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=".$filename);
readfile($hashed_filename);
exit();
Remember that when sending header()'s your code must not have generated any output prior to that point...