[thelist] cURL, PHP and downloading files
Jay Blanchard
jay.blanchard at niicommunications.com
Tue Jul 2 09:50:01 CDT 2002
Matthias,
[snip]
I just did the same thing by using the header function in php.
if (strstr($_SERVER["HTTP_USER_AGENT"], "MSIE"))
{
header("HTTP/1.0 200 OK");
}
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=$file_name");
header("Content-Location: $file_path");
header("content-length: $filesize");
$fp = fopen("$file_path", "r");
print fread($fp, $filesize);
fclose($fp);
[/snip]
I tried this, but it balks at the HTTPS connection. I have to be able to
send the user name and password.
Thanks!
Jay
More information about the thelist
mailing list