CURL
| From: | Daniel Demacek | Date: | Mon, 24 Sep 2001 21:27:44 +0000 |
| Subject: | CURL | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-68603@lists.php.net to get a copy of this message | ||
Hi, all
anyone know how to get this to work?
<?php
# this is suppose to do same thing as fpassthru();
# but using SSL
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . $f);
$ch = curl_init();
$fp = fopen($the_path."/".$loginname.$f, "r");
curl_setopt ($ch, CURLOPT_INFILE, $fp);
curl_setopt ($ch, CURLOPT_INFILESIZE, $file_size);
curl_setopt ($ch, CURLOPT_PUT, 1);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
?>
I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it
had an underlying truth.