How to force download a file?

Discussion in 'General Chat' started by crazlunatic, Mar 2, 2008.

  1. #1
    Hi. If I host a .mpg file for someone to download, when they click, it will auto-play. How do I make it so that instead of playing, a window will pop up asking them for download?


    Also, I'm pretty sure this question doesn't belong here. Is there some other place I should put this or some other forum I should be asking at? Thanks.
     
    crazlunatic, Mar 2, 2008 IP
  2. 5starpix

    5starpix Notable Member

    Messages:
    6,380
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    235
    #2
    Right Click On The File & Click On 'Save Target As'
     
    5starpix, Mar 2, 2008 IP
  3. SEOBusiness

    SEOBusiness Well-Known Member

    Messages:
    3,046
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    185
    #3
    Just add a url of your target file and let your visitor click the url to download.
     
    SEOBusiness, Mar 2, 2008 IP
  4. crazlunatic

    crazlunatic Well-Known Member

    Messages:
    813
    Likes Received:
    113
    Best Answers:
    0
    Trophy Points:
    128
    #4
    But since it's an .mpg, if they click it and they have quicktime, it will just play within their browser. I don't want that to happen.
     
    crazlunatic, Mar 2, 2008 IP
  5. 5starpix

    5starpix Notable Member

    Messages:
    6,380
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    235
    #5
    do what i said, it will work..lol
     
    5starpix, Mar 2, 2008 IP
  6. Abhik

    Abhik ..:: The ONE ::..

    Messages:
    11,337
    Likes Received:
    606
    Best Answers:
    0
    Trophy Points:
    410
    Digital Goods:
    2
    #6
    If thats a direct link, ask your visitors to use Download Managers.
     
    Abhik, Mar 2, 2008 IP
  7. 5starpix

    5starpix Notable Member

    Messages:
    6,380
    Likes Received:
    83
    Best Answers:
    0
    Trophy Points:
    235
    #7
    i use;

    Download Accelerator Plus (DAP)
     
    5starpix, Mar 2, 2008 IP
  8. crazlunatic

    crazlunatic Well-Known Member

    Messages:
    813
    Likes Received:
    113
    Best Answers:
    0
    Trophy Points:
    128
    #8
    I know how to download the file. But when OTHERS click on it, I want the dialog box to pop up where they are asked whether to open or save. Because if they click, it will automatically go to an embed. And if I tell them to right click and save target as, chances are they won't listen.
     
    crazlunatic, Mar 2, 2008 IP
  9. Proximity

    Proximity Banned

    Messages:
    3,930
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #9
    If they have download accelarator i will automatically download the file
     
    Proximity, Mar 2, 2008 IP
  10. TuchWitty

    TuchWitty Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    May be you wanna check out the article here:

    _http://www.sometricks.com/2006/04/23/download-pdf-jpg-gif-directly-from-the-web-browser/
     
    TuchWitty, Mar 3, 2008 IP
  11. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #11
    You need a server side script to force the download. You can do this easily with PHP. You have to send some specific headers, and then read and output the file with PHP.

    www.php.net/header

    There are a lot of examples...
     
    nico_swd, Mar 3, 2008 IP