|
Posted by Jim Michaels on 10/13/65 11:37
in other posts you will find that there are other headers you need to
include for a file download.
http://www.iana.org/assignments/media-types/application/zip
http://support.microsoft.com/kb/q279667/
http://www.ietf.org/rfc/rfc2183.txt
http://www.phpbuilder.com/board/printthread.php?t=10210843
header("Content-Type: application/download"); // or application/x-download,
or application/zip
header("Content-Disposition = attachment; filename=file1.zip");
it won't work with a URL. not according to RFC2183 (content-disposition
usage). the filename specified is the filename that the user gets on their
side if I am correct.
I have tried opening a new window with a zip file as the address and getting
a screen full of garbage instead of a download, so I don't quite know how
that will work.
try downloading wget and extracting one of the links from a mirror site and
see what they use for headers. I don't know if wget will allow you to get
headers or not.
I know of another, manual technique if you don't have packet sniffer
software, to look at headers.
I really suspect (from the research I've done so far) that there isn't a way
unless you've set up the other web sites as mirror sites.
"Peter" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> wrote in
message news:5vkkf.63679$j_1.3932252@phobos.telenet-ops.be...
> Hi,
>
> I have a couple of download links on my site but they are in fact links to
> a php script.
> I dynamically construct a url to the file based on script input and/or a
> randomizer to be able to spread the download over multiple locations etc.
>
> At the end of the script I do this :
>
> header("Location: $newurl"); // re-direct
>
> The $newurl is then for instance http://www.location1/file1.zip
>
> I have logged many thousands of (suposedly) successful downloads but once
> in a while I get an email from somebody who claims download doesn't work
> from all links. When I then try I have no problem at all.
> This has not happened once, of course not everybody will do the effort to
> write an email. Say once every 50.000 (logged) downloads (probably less)
>
> Q.
> 1. Do you think this could be due to bandwidth issues sometimes ?
> Although these people usually claim the website itself works ok and fast
> enough ?
> 2. Or do you think that the header() call is not always OK ? I have no
> issues with IE and FireFox and yet usually these claims come from people
> using either IE or Firefox as well.
> 3. Or something else altogether ?
>
>
Navigation:
[Reply to this message]
|