Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Nov 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    downloadable wavs

    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
    kattttttttttt

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You want them to listen on your site or send them the file?
    Last edited by zoobie; 11-28-2002 at 12:44 AM.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #3
    New Coder
    Join Date
    Nov 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I actually want it to download to their computer so it can be played in Windows Media Player, is it possible?
    kattttttttttt

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Location
    Raleigh, NC
    Posts
    484
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    -WebMark Art
    Programming is 80% thinking and 20% spelling

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #6
    New Coder
    Join Date
    Nov 2002
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    kattttttttttt

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Did you get it?
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can use PHP to force a download. This as a file called "download.php":

    PHP Code:
    <?

    $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");
    readfile($savePath);

    ?>

    And then you call it with a link like this:

    Code:
    <a href="/download.php/?path=music/hifi/500mush.mp3&name=500mush.mp3">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •