Pauls74462 Posted March 12, 2009 Share Posted March 12, 2009 I need help on this:I have a download page set up, when a user clicks to download a program it goes to the download page and will rerecord information from the user. I want it to auto download with out the user having to click download link. How can I do this?. I have search Google for this and have found nothing useful. Please help. Link to comment Share on other sites More sharing options...
justsomeguy Posted March 12, 2009 Share Posted March 12, 2009 If you don't care about showing any information on the download page, if it's only server-side processing, then after you do your processing you can just use headers to tell the browser what kind of file you're about to send, and then output the file. If you do want to show something on the download page, then you can use either a meta redirect, a Javascript redirect, or use a hidden iframe that you set to the URL of the file to download. Link to comment Share on other sites More sharing options...
Pauls74462 Posted March 14, 2009 Author Share Posted March 14, 2009 If you don't care about showing any information on the download page, if it's only server-side processing, then after you do your processing you can just use headers to tell the browser what kind of file you're about to send, and then output the file. If you do want to show something on the download page, then you can use either a meta redirect, a Javascript redirect, or use a hidden iframe that you set to the URL of the file to download.what would the output code look like?Will try it. Link to comment Share on other sites More sharing options...
justsomeguy Posted March 16, 2009 Share Posted March 16, 2009 There's an example here:http://www.ryboe.com/tutorials/php-headers-force-downloadInstead of using the zip mime type, you would probably want to use the generic content type "application/octet-stream" instead. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.