Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: Force Download with .htaccess

  1. #11
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    You tell them to right click, save as, on the link.
    Or they can click it and stream.


    Even if you coded some complex setup checking their preferences, setting cookies, doing forms, storing the prefs in a database... whatever the heck you want, you'd STILL, to be able to act on those prefs, make a way to force them to download the file.

    the point is... you can't do that, from what I'm hearing. Which, yeah, isn't too great, but it's what you gotta work with.

  2. #12
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    that's the easiest option but the website's in Flash and when you right click all you get is the flash options, no save target as. The only way I can think of the get around it is to have the link open up a pop up window with the html link in it, users can then right click to download the link.

    This would require building a seperate html file for each song to downlaod, unless there was a way to have one html page for the pop up and then pass a variable from the flash link into it. My knowledge of HTML is pretty basic, any tips?

  3. #13
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    The easiest way to do it is to compress the file, as I've already mentioned. Almost all users have their browsers set up to download a compressed file, rather than opening it with a plugin. Note that this won't work for image files.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #14
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    It's funny now that I think about it; there are so many efforts and semi-workable ways to do the exact opposite.
    You can force someone to stream, or come darn close, but you don't seem to be able to force a download. Interesting.

  5. #15
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's impossible to force a user to handle the data you supply in any given way. Once the user downloads the data, it's in their hands (and those of their system).
    The system is what we depend upon when trying to get the user to download or stream something rather than the alternative. We just have to hope it adheres to the norms. However, there will always be systems that don't, and users who would rather take personal control. Therefore, this should never be relied upon.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  6. #16
    Join Date
    Mar 2006
    Location
    UK, warwickshire
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If it was possible to force the download of things the internet would not exsist, because computors would not be able to run. this because of people forcing the download of viruses. just thought id get you thinking on that

  7. #17
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I think you missed the point of this.
    Firstly, downloading malicious code is quite harmless. I have a few on my machine I've been studying, actually. Only if the code is run does it pose a threat (which is why I use qemu ). The issue here was not forcing a download, but forcing the browser to perform a specific action on the data after the download, such as opening it in a media player -- or, in this case, not opening it in a media player.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #18
    Join Date
    Mar 2006
    Location
    UK, warwickshire
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ow oops, my mistake. Sorry about that but know in that case that is inpossible. I have never saw it done before and don't think i will for a long time

  9. #19
    Join Date
    Apr 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Windows server side solution

    This fellow seems to have found a solution that works with all browsers (but this is only if you are being hosted on a Windows Server and can make/request the change).

    See [for explanation]:

    http://www.jakeludington.com/windows...downloads.html

    See [for an example of this in action, simply click the link to download this movie]:http://www.pmcmovies.com/

  10. #20
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by benau
    This fellow seems to have found a solution that works with all browsers (but this is only if you are being hosted on a Windows Server and can make/request the change).
    He hasn't, and it'll work with any server; only the instructions are for IIS.

    The Content-Disposition header - which originates from MIME not HTTP, but is quite widely implemented by browsers, nevertheless - is well-known, but not foolproof. Most notably, older IE browsers fail to react to it properly, though they aren't the sole offenders.

    The previous comments still stand.

    Mike

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
  •