#39637 [Opn->Csd]: Add more curl_setopt options
| From: | pajoye@php.net | Date: | Mon, 04 May 2009 14:21:22 +0000 |
| Subject: | #39637 [Opn->Csd]: Add more curl_setopt options | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136731@lists.php.net to get a copy of this message | ||
ID: 39637
Updated by: pajoye@php.net
Reported By: apinstein at mac dot com
-Status: Open
+Status: Closed
Bug Type: Feature/Change Request
Operating System: all
PHP Version: 5.2.0
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
5.3+
Previous Comments:
------------------------------------------------------------------------
[2006-11-26 16:22:53] apinstein at mac dot com
Description:
------------
PHP's curl_setopt is missing many options available in
libcurl.
Reproduce code:
---------------
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FTP_USE_EPSV, false);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FAILONERROR, true);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, 138 /* CURLOPT_FTP_FILEMETHOD */, 3 /*
CURLFTPMETHOD_SINGLECWD */); // not supported yet; integers don't work
$localFH = fopen($localCopyPath, 'w+');
curl_setopt($ch, CURLOPT_FILE, $localFH);
$ok = curl_exec($ch);
curl_close($ch);
Expected result:
----------------
I would expect that the curl extension would keep more up-
to-date with the curl options.
man curl_easy_setopt
will show all available curl options.
Alternatively, it'd be nice if there were a curl_easy_setopt
() function in php so that one could use options even if
they were not "supported" in php. At present, even passing
the correct integer values to curl_setopt() will not do
anything since the php curl extension only accepts defined
options.
In particular, I need the following options:
option: CURLOPT_FTP_FILEMETHOD
values: CURLFTPMETHOD_MULTICWD, CURLFTPMETHOD_NOCWD,
CURLFTPMETHOD_SINGLECWD
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39637&edit=1