Give the client a forced download to the client.
header("Content-type: application/force-download");
header("Content-Disposition: attachment; filename=\"file.zip\"");
header("Content-Length: ".filesize("file.zip"));
The length of the content is optional.
You will need to create a php script that will be associated with this:
<a href="http://server/script.php?emailId=12345&fileName=file.zip">
And the PHP script will just send the headers above and print the full contents of the file.
source
share