View Full Version : downloadable wavs
11-28-2002, 12:10 AM
I know there's probably an easy explanation for this so I'll get right to the point lol..
When a person enters a certain part on my site there will be links saying something similar to this ;
kiis1.wav ; click to listen
how do I get the file to download to there computer when they click on the link?
..does that make sense? pleasee help
11-28-2002, 12:20 AM
You want them to listen on your site or send them the file?
11-28-2002, 01:11 AM
I actually want it to download to their computer so it can be played in Windows Media Player, is it possible?
11-28-2002, 05:21 AM
just use a regular link:
<a href="sound.wav">click to listen</a>
It will probably promt them if they want to open or save the file, but either way its downloading to their computer. If the select open it will download to a temp directory and play in their default player and if they want to save it it will prompt them to select the directory to save it to.
11-28-2002, 05:38 AM
I think you're going to have to do more research on this topic. First of all, wav's are huge. You can't ask someone to download a whole song...unless they have 30 minutes to spare. :D
11-28-2002, 06:47 AM
Um, it's not really wavs of a song at all. It's just clips of a person talking that are only like 15-20 seconds long..
Thank you for ya'lls help.
11-29-2002, 09:18 PM
Did you get it?
11-29-2002, 09:25 PM
You can use PHP to force a download. This as a file called "download.php":
$saveName = stripslashes($HTTP_GET_VARS["name"]);
$savePath = stripslashes($HTTP_GET_VARS["path"]);
header ("Content-Type: application/octet-stream");
header ("Content-Disposition: attachment; filename=$saveName");
header ("Content-Transfer-Encoding: binary");
And then you call it with a link like this:
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.