kaliok Posted January 6, 2009 Share Posted January 6, 2009 Hi Hopefully someone can help answer this. I would like to give people the ability to download wmv and mp3 files from my site. They are already embedded and play fine through various players but I ALSO want to have a plain text link that users can click to download the files to their own computer. Having the file open in a new window obviously doesn't work since it just plays the file in that new window. I want it to directly download the file, without the need to right click or do anything but click a link. I also don't want to have to zip the file. Is this possible, if so, how do I do it. Thanks for any help in advance. Quote Link to comment Share on other sites More sharing options...
bubbasheeko Posted January 6, 2009 Share Posted January 6, 2009 Zipping the file would do it, but I think you may be better off having a separate file handle the download - move to a php download option.... Quote Link to comment Share on other sites More sharing options...
kaliok Posted January 6, 2009 Author Share Posted January 6, 2009 Thanks for your quick response. I know zipping the file would solve the problem, but would prefer not to do that. Could you point me in the right direction for using php to give the user the ability to download the files. Thanks again. Quote Link to comment Share on other sites More sharing options...
htmlstig Posted January 7, 2009 Share Posted January 7, 2009 if you have acess to a .htaccess file you could add AddType audio/x-mp3 mp3 to it not sure if it would force a window for the embeded mp3s or not Quote Link to comment Share on other sites More sharing options...
bubbasheeko Posted January 7, 2009 Share Posted January 7, 2009 htmlstig, I am certain that would work like an image/gif type - it would open it in a new window and attempt to play it. kaliok. It can be a timely thing to set up a download section using PHP, but this site makes it somewhat easier. http://www.zubrag.com/scripts/download.php I have used it once before. Now my PHP knowledge is a most likely better than your own - but if you follow the instructions that are included you may not run into any problems. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.