Last active
May 24, 2016 05:27
-
-
Save goldnetonline/a77814e32fd6ceee3d8112d5be9de424 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$file_url = 'http://www.myremoteserver.com/file.exe'; | |
header('Content-Type: application/octet-stream'); | |
header("Content-Transfer-Encoding: Binary"); | |
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\""); | |
readfile($file_url); // do the double-download-dance (dirty but worky) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment