Results 1 to 2 of 2

Thread: script and help wanted for "forced-download of mp3"

  1. #1
    Join Date
    Sep 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default script and help wanted for "forced-download of mp3"

    I want to force a download of an mp3 file from my website. The file is 26 mins and there is already sound playing in the background of the page where I want to the link to be, therefore I really need the mp3 in question to be downloaded rather than played when people click the link. How do I force my site (or the browser) to download the mp3 rather than playing it?

    To build my site I am using WebPlusX2 by Serif but this software seems unable to create the option for downloading an mp3 when visitors to my site click a link. I am inexperienced with code and script. I only know a few things in html code such as <b> bold </b> makes things 'bold'. I know nothing about PHP but it seems that I need to use PHP to complete my task. My limited research into this matter indictaes PHP can be usful to acheive my goal. I also have ExpressionWeb software and this will allow me to create a PHP file. I believe the PHP file goes on the server where my site is but I don't know how I connect my web-page to the PHP script, perhaps a simple link will suffice? I also believe there are security issues with having a forcedownload PHP script on my server which enables a mp3 file to automatically donwload. Obviously I would not want to do anything to comprmise the security of my site. How secure is this thing I want to do? IS there a safe script for my task?

    Please can someone advise me where I can obtain the correct *safe* script that will make a link to my mp3 file downlaod rather than play. I do not want the mp3 to play when visitors click the link. I want it to donwlaod.

    Phew! Hope that's clear and I hope someone can help.


  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    the only true way to force a download is to zip it. you could also trick the browser by sending the wrong header but that doesn't always work. the other way is to tell users to right click save as.
    Last edited by Master_script_maker; 09-15-2008 at 02:57 AM.
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

Bookmarks

Posting Permissions

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