Skip to content

Commit a36e4dc

Browse files
committed
Update curl
1 parent 4ec0fe3 commit a36e4dc

14 files changed

+124
-3051
lines changed

reference/curl/constants.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 09619263cfbc188c49e9219e0d983bcf90231026 Maintainer: daijie Status: ready -->
3+
<!-- EN-Revision: dec90c90d3662c5433f7c3972f8557321da7b11d Maintainer: daijie Status: ready -->
44
<!-- CREDITS: mowangjuanzi, Luffy -->
55
<appendix xml:id="curl.constants" xmlns="http://docbook.org/ns/docbook">
66
&reftitle.constants;
@@ -1976,7 +1976,7 @@
19761976
</term>
19771977
<listitem>
19781978
<simpara>
1979-
支持协商(Negotiate)身份验证。自 PHP 7.3.0 和 cURL 7.10.6 起可用(自 7.38.0 起弃用)
1979+
支持协商(Negotiate)身份验证。自 PHP 7.3.0 和 cURL 7.10.6 起可用(自 cURL 7.38.0 起弃用)
19801980
</simpara>
19811981
</listitem>
19821982
</varlistentry>

reference/curl/constants_curl_setopt.xml

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4250,11 +4250,8 @@
42504250
</term>
42514251
<listitem>
42524252
<para>
4253-
A <type>callable</type> with the following signature that gets called after the
4254-
connection is established, but before the request payload (for example, the
4255-
GET/POST/DELETE request of an HTTP connection) is sent, and can be used to abort
4256-
or allow the connection depending on the source and destination IP address and
4257-
port numbers:
4253+
具有以下签名的 <type>callable</type>,在建立连接之后但在发送请求负载(例如,HTTP 连接的
4254+
GET/POST/DELETE 请求)之前调用,可用于根据源和目标 IP 地址和端口号中止或允许连接:
42584255
<methodsynopsis>
42594256
<type>int</type><methodname><replaceable>callback</replaceable></methodname>
42604257
<methodparam><type>CurlHandle</type><parameter>curlHandle</parameter></methodparam>
@@ -4268,52 +4265,46 @@
42684265
<term><parameter>curlHandle</parameter></term>
42694266
<listitem>
42704267
<simpara>
4271-
The cURL handle.
4268+
cURL 句柄。
42724269
</simpara>
42734270
</listitem>
42744271
</varlistentry>
42754272
<varlistentry>
42764273
<term><parameter>destination_ip</parameter></term>
42774274
<listitem>
42784275
<simpara>
4279-
The primary IP of the remote server established with this connection.
4280-
For <acronym>FTP</acronym>, this is the IP for the control connection.
4281-
IPv6 addresses are represented without surrounding brackets.
4276+
使用此连接建立的远程服务器的主 IP。对于 <acronym>FTP</acronym>,这是控制连接的 IP。IPv6 地址不带括号。
42824277
</simpara>
42834278
</listitem>
42844279
</varlistentry>
42854280
<varlistentry>
42864281
<term><parameter>local_ip</parameter></term>
42874282
<listitem>
42884283
<simpara>
4289-
The originating IP for this connection.
4290-
IPv6 addresses are represented without surrounding brackets.
4284+
此连接的原始 IP。IPv6 地址不带括号。
42914285
</simpara>
42924286
</listitem>
42934287
</varlistentry>
42944288
<varlistentry>
42954289
<term><parameter>destination_port</parameter></term>
42964290
<listitem>
42974291
<simpara>
4298-
The primary port number on the remote server established with this connection.
4299-
For <acronym>FTP</acronym>, this is the port for the control connection.
4300-
This can be a <acronym>TCP</acronym> or a <acronym>UDP</acronym> port number depending on the protocol.
4292+
使用此连接建立的远程服务器上的主端口号。对于 <acronym>FTP</acronym>,这是控制连接的端口。根据协议的不同,这可能是
4293+
<acronym>TCP</acronym> 或 <acronym>UDP</acronym> 端口号。
43014294
</simpara>
43024295
</listitem>
43034296
</varlistentry>
43044297
<varlistentry>
43054298
<term><parameter>local_port</parameter></term>
43064299
<listitem>
43074300
<simpara>
4308-
The originating port number for this connection.
4309-
This can be a <acronym>TCP</acronym> or a <acronym>UDP</acronym> port number depending on the protocol.
4301+
此连接的发起端口号。根据协议的不同,这可能是 <acronym>TCP</acronym> 或 <acronym>UDP</acronym> 端口号。
43104302
</simpara>
43114303
</listitem>
43124304
</varlistentry>
43134305
</variablelist>
4314-
Return <constant>CURL_PREREQFUNC_OK</constant> to allow the request, or
4315-
<constant>CURL_PREREQFUNC_ABORT</constant> to abort the transfer.
4316-
Available as of PHP 8.4.0 and cURL 7.80.0.
4306+
返回 <constant>CURL_PREREQFUNC_OK</constant> 以允许请求,或返回 <constant>CURL_PREREQFUNC_ABORT</constant>
4307+
以中止传输。自 PHP 8.4.0 和 cURL 7.80.0 起可用。
43174308
</para>
43184309
</listitem>
43194310
</varlistentry>
@@ -4324,11 +4315,8 @@
43244315
</term>
43254316
<listitem>
43264317
<para>
4327-
Available as of PHP 8.4.0.
4328-
This option requires <constant>CURLOPT_VERBOSE</constant> option enabled.
4329-
A <type>callable</type> to replace the standard cURL verbose output.
4330-
This callback gets called during various stages of the request with verbose debug information.
4331-
The callback should match the following signature:
4318+
自 PHP 8.4.0 起可用。此选项需要启用 <constant>CURLOPT_VERBOSE</constant> 选项。<type>callable</type>
4319+
来替换标准 cURL 详细输出。此回调在请求的各个阶段使用详细调试信息进行调用。回调应与以下签名匹配:
43324320
<methodsynopsis>
43334321
<type>void</type><methodname><replaceable>callback</replaceable></methodname>
43344322
<methodparam><type>CurlHandle</type><parameter>curlHandle</parameter></methodparam>
@@ -4340,15 +4328,15 @@
43404328
<term><parameter>curlHandle</parameter></term>
43414329
<listitem>
43424330
<simpara>
4343-
The cURL handle.
4331+
cURL 句柄。
43444332
</simpara>
43454333
</listitem>
43464334
</varlistentry>
43474335
<varlistentry>
43484336
<term><parameter>type</parameter></term>
43494337
<listitem>
43504338
<simpara>
4351-
One of the following constants indicating the type of the <parameter>data</parameter> value:
4339+
下列常量之一表示 <parameter>data</parameter> 值的类型:
43524340
</simpara>
43534341
<variablelist xml:id="constant.curl-debugfunction.constants" role="constant_list">
43544342
<varlistentry xml:id="constant.curlinfo-text">
@@ -4358,7 +4346,7 @@
43584346
</term>
43594347
<listitem>
43604348
<simpara>
4361-
Informational text.
4349+
信息文本。
43624350
</simpara>
43634351
</listitem>
43644352
</varlistentry>
@@ -4369,7 +4357,7 @@
43694357
</term>
43704358
<listitem>
43714359
<simpara>
4372-
Header (or header-like) data received from the peer.
4360+
从对等方接受的 header(或者类似 header)值。
43734361
</simpara>
43744362
</listitem>
43754363
</varlistentry>
@@ -4391,8 +4379,7 @@
43914379
</term>
43924380
<listitem>
43934381
<simpara>
4394-
Unprocessed protocol data received from the peer.
4395-
Even if the data is encoded or compressed, it is not provided decoded nor decompressed to this callback.
4382+
从对等方接收到的未处理协议数据。即使数据已编码或压缩,也不会向此回调提供解码或解压缩后的数据。
43964383
</simpara>
43974384
</listitem>
43984385
</varlistentry>
@@ -4403,7 +4390,7 @@
44034390
</term>
44044391
<listitem>
44054392
<simpara>
4406-
Protocol data sent to the peer.
4393+
发送给对等方的协议数据。
44074394
</simpara>
44084395
</listitem>
44094396
</varlistentry>
@@ -4414,7 +4401,7 @@
44144401
</term>
44154402
<listitem>
44164403
<simpara>
4417-
<acronym>SSL</acronym>/<acronym>TLS</acronym> (binary) data received from the peer.
4404+
从对等方接收的 <acronym>SSL</acronym>/<acronym>TLS</acronym>(二进制)数据。
44184405
</simpara>
44194406
</listitem>
44204407
</varlistentry>
@@ -4425,7 +4412,7 @@
44254412
</term>
44264413
<listitem>
44274414
<simpara>
4428-
<acronym>SSL</acronym>/<acronym>TLS</acronym> (binary) data sent to the peer.
4415+
发送给对等方的 <acronym>SSL</acronym>/<acronym>TLS</acronym>(二进制)数据。
44294416
</simpara>
44304417
</listitem>
44314418
</varlistentry>
@@ -4436,7 +4423,7 @@
44364423
<term><parameter>data</parameter></term>
44374424
<listitem>
44384425
<simpara>
4439-
Verbose debug data of the type indicate by the <parameter>type</parameter> parameter.
4426+
<parameter>type</parameter> 参数表示的类型的详细调试数据。
44404427
</simpara>
44414428
</listitem>
44424429
</varlistentry>

reference/curl/functions/curl-exec.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: b7f8c11e56ff1c57a2993e2ed7e5c5ace18637fd Maintainer: daijie Status: ready -->
3+
<!-- EN-Revision: 6c60e8e8fcd92bdaa469f7292b12179e841dfd39 Maintainer: daijie Status: ready -->
44
<!-- CREDITS: mowangjuanzi -->
55
<refentry xml:id="function.curl-exec" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -34,8 +34,9 @@
3434
<refsect1 role="returnvalues">
3535
&reftitle.returnvalues;
3636
<para>
37-
&return.success; 然而,如果<link linkend="function.curl-setopt">设置</link>了
38-
<constant>CURLOPT_RETURNTRANSFER</constant> 选项,将会在成功时返回结果,失败时返回 &false;
37+
成功时,函数会将结果直接冲刷到 <literal>stdout</literal> 并返回 &true;&return.falseforfailure;。然而,如果<link
38+
linkend="function.curl-setopt">设置</link>了 <constant>CURLOPT_RETURNTRANSFER</constant>
39+
选项,将会在成功时返回结果,失败时返回 &false;
3940
</para>
4041
&return.falseproblem;
4142
<note>

0 commit comments

Comments
 (0)