dreamwest Posted May 9, 2009 Share Posted May 9, 2009 I want to make a download link that doesnt link directly to the file but uses a download.php page to get the file. I not sure how to go about it.... Ive got this far : $ID = strip_tags($_GET[id]); $real_location = "http//site.com/files/".$ID.".jpg"; //Fake url location $url = downloadLink($ID); echo "<a href=\"".$url."\">Click here to download file!</a>"; Link to comment https://forums.phpfreaks.com/topic/157452-indirect-download-file/ Share on other sites More sharing options...
Ken2k7 Posted May 9, 2009 Share Posted May 9, 2009 Can't you use .htaccess for this? Just mod_rewrite the fake URL to display the contents of the real URL but don't redirect the user. Link to comment https://forums.phpfreaks.com/topic/157452-indirect-download-file/#findComment-830062 Share on other sites More sharing options...
dreamwest Posted May 9, 2009 Author Share Posted May 9, 2009 The url is on another server Link to comment https://forums.phpfreaks.com/topic/157452-indirect-download-file/#findComment-830096 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.