diff --git a/reference/curl/functions/curl-setopt.xml b/reference/curl/functions/curl-setopt.xml index 68a0163d92..e46a7cd042 100644 --- a/reference/curl/functions/curl-setopt.xml +++ b/reference/curl/functions/curl-setopt.xml @@ -579,6 +579,26 @@ + + CURLOPT_POSTREDIR + + + Set the behavior for following redirects with + CURLOPT_FOLLOWLOCATION. By default a + redirect will be followed with a GET request, regardless of the + original HTTP request type. + + + This field is a bitmask. The two available settings are: 1 to + follow a redirect with the same request type for 301 redirect, + and 2 to follow a redirect with the same request type for 302 + redirects. + + + + Added in cURL 7.19.1. Available since PHP 5.3.2. + + CURLOPT_PROTOCOLS @@ -1276,6 +1296,7 @@ Option Set value to + Notes @@ -1288,6 +1309,8 @@ be written when by this callback. Return the number of bytes written. + + CURLOPT_PASSWDFUNCTION @@ -1297,29 +1320,24 @@ string containing a password prompt, and the third is the maximum password length. Return the string containing the password. + + CURLOPT_PROGRESSFUNCTION - - A callback accepting five parameters. - The first is the cURL resource, the second is the total number of - bytes expected to be downloaded in this transfer, the third is - the number of bytes downloaded so far, the fourth is the total - number of bytes expected to be uploaded in this transfer, and the - fifth is the number of bytes uploaded so far. - - - - The callback is only called when the CURLOPT_NOPROGRESS - option is set to &false;. - - - - Return a non-zero value to abort the transfer. In which case, the - transfer will set a CURLE_ABORTED_BY_CALLBACK - error. - + A callback accepting five parameters. + The first is the cURL resource, the second is the total number of bytes + libcurl expects to download in this transfer, the third is the number + of bytes downloaded so far, the fourth is the total number of bytes + libcurl expects to upload in this transfer and the fifth is the number + of bytes uploaded so far. Returning a non-zero value from this callback + will cause libcurl to abort the transfer. + This option implies to set CURLOPT_NOPROGRESS to 0. + + + For PHP < 5.5.0, this callback had only four parameters. The cURL + resource was not passed. @@ -1334,6 +1352,8 @@ typically by reading it from the passed stream resource. It should return an empty string to signal EOF. + + CURLOPT_WRITEFUNCTION @@ -1344,27 +1364,7 @@ this callback. It must return the exact number of bytes written or the transfer will be aborted with an error. - - - - - - - Other values: - - - - - Option - Set value to - - - - - CURLOPT_SHARE - A result of curl_share_init. Makes the cURL - handle to use the data from the shared handle. @@ -1396,25 +1396,6 @@ - - 5.5.0 - - Added the cURL resource as the first argument to the - CURLOPT_PROGRESSFUNCTION callback. - - - - 5.5.0 - - Introduced CURLOPT_SHARE. - - - - 5.3.0 - - Introduced CURLOPT_PROGRESSFUNCTION. - - 5.2.10