When a link is clicked, i should be able to download the wav file…I know it can be done by right click, save target…and also by zipping wav file…but that is not my aim..How can this be done? Is there any scripts?….Please guide
@opifexOct 14.2009 — #Do you want ALL wav files to down load or just certain ones?
To force all .wav to down load you can use .htaccess[CODE]<FilesMatch ".(?i:wav)$"> ForceType application/octet-stream Header set Content-Disposition attachment </FilesMatch>[/CODE] -------------------------------------------
to pick and choose you can use this snippet[code=php] <?php $file = $_GET['file']; header ("Content-type: octet/stream"); header ("Content-disposition: attachment; filename=".$file.";"); header("Content-Length: ".filesize($file)); readfile($file); exit; ?>[/code] and make your link like this[code=html]<a href="forcedownload.php?file=sound.wav">Download WAV file</a>[/code]
@opifexOct 15.2009 — #save the snippet as forcedownload.php.
Hopefully you have PHP installed on the server! if not, try asking again in the ASP forum... the solution would be similar, but the syntax is different.
I always wonder why people would want to use Windows servers when the quality and flexibility of any NIX server with Apache server readily available.