cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: File Open & download

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 6 Feb 2002 15:32:10 +0100 (MET)

On Tue, 5 Feb 2002, David THOMAS wrote:

> We have a picture with this link
> https://www.domain.com/download.php?f=myfile.zip
>
> The download file is the following
> <?
> header("Content-Type: application/octet-stream");
> header("Content-Length: ".filesize("$UPLOAD_PATH/$f"));
> header("Content-Disposition: attachment; filename=" . basename("$UPLOAD_PATH/$f"));
> $data="";
> while (!feof($d)) $data.=fread($d,100000);
> fclose($d);
> print $data;
> ?>
>
> It works well with Netscape but nothing happends with IE (just cannot
> download) However if we try the link without https it works well with IE.
>
> Any ideas? Maybe CURL could help me.

I don't understand at all where curl comes into this picture.

curl downloads or uploads files. This script seems to provide a file to a
user-agent (such as curl), it doesn't seem to use curl, and I can't see why
it should either.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2002-02-06