Adding CURLOPT_POSTREDIR option.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@331005 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Paul Dragoonis 2013-07-22 23:07:17 +00:00
parent 8159992f1b
commit 423959d319

View file

@ -579,6 +579,26 @@
<entry valign="top">
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_POSTREDIR</constant></entry>
<entry valign="top">
<para>
Set the behavior for following redirects with
<constant>CURLOPT_FOLLOWLOCATION</constant>. By default a
redirect will be followed with a GET request, regardless of the
original HTTP request type.
</para>
<para>
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.
</para>
</entry>
<entry valign="top">
Added in cURL 7.19.1. Available since PHP 5.3.2.
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_PROTOCOLS</constant></entry>
<entry valign="top">
@ -1276,6 +1296,7 @@
<row>
<entry>Option</entry>
<entry>Set <parameter>value</parameter> to</entry>
<entry>Notes</entry>
</row>
</thead>
<tbody>
@ -1288,6 +1309,8 @@
be written when by this callback. Return the number of
bytes written.
</entry>
<entry valign="top">
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_PASSWDFUNCTION</constant></entry>
@ -1297,29 +1320,24 @@
string containing a password prompt, and the third is the maximum
password length. Return the string containing the password.
</entry>
<entry valign="top">
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_PROGRESSFUNCTION</constant></entry>
<entry valign="top">
<para>
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.
</para>
<note>
<para>
The callback is only called when the <constant>CURLOPT_NOPROGRESS</constant>
option is set to &false;.
</para>
</note>
<para>
Return a non-zero value to abort the transfer. In which case, the
transfer will set a <constant>CURLE_ABORTED_BY_CALLBACK</constant>
error.
</para>
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 <constant>CURLOPT_NOPROGRESS</constant> to 0.
</entry>
<entry valign="top">
For PHP &lt; 5.5.0, this callback had only four parameters. The cURL
resource was not passed.
</entry>
</row>
<row>
@ -1334,6 +1352,8 @@
typically by reading it from the passed stream resource. It should
return an empty string to signal <literal>EOF</literal>.
</entry>
<entry valign="top">
</entry>
</row>
<row>
<entry valign="top"><constant>CURLOPT_WRITEFUNCTION</constant></entry>
@ -1344,27 +1364,7 @@
this callback. It must return the exact number of bytes written
or the transfer will be aborted with an error.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
<para>
Other values:
<informaltable>
<tgroup cols="3">
<thead>
<row>
<entry>Option</entry>
<entry>Set <parameter>value</parameter> to</entry>
</row>
</thead>
<tbody>
<row>
<entry valign="top"><constant>CURLOPT_SHARE</constant></entry>
<entry valign="top">
A result of <function>curl_share_init</function>. Makes the cURL
handle to use the data from the shared handle.
</entry>
</row>
</tbody>
@ -1396,25 +1396,6 @@
</row>
</thead>
<tbody>
<row>
<entry>5.5.0</entry>
<entry>
Added the cURL resource as the first argument to the
<constant>CURLOPT_PROGRESSFUNCTION</constant> callback.
</entry>
</row>
<row>
<entry>5.5.0</entry>
<entry>
Introduced <constant>CURLOPT_SHARE</constant>.
</entry>
</row>
<row>
<entry>5.3.0</entry>
<entry>
Introduced <constant>CURLOPT_PROGRESSFUNCTION</constant>.
</entry>
</row>
<row>
<entry>5.2.10</entry>
<entry>