reference/curl/functions/curl-multi-info-read.xml
976425d4f6eec32448be3cc22ec063015921b753
976425d4f6eec32448be3cc22ec063015921b753
...
...
@@ -9,9 +9,9 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>curl_multi_info_read</methodname>
13
-
<methodparam><type>resource</type><parameter>mh</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter role="reference">msgs_in_queue</parameter><initializer>&null;</initializer></methodparam>
12
+
<type class="union"><type>array</type><type>false</type></type><methodname>curl_multi_info_read</methodname>
13
+
<methodparam><type>CurlMultiHandle</type><parameter>multi_handle</parameter></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter role="reference">queued_messages</parameter><initializer>&null;</initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
Ask the multi handle if there are any messages or information from the individual transfers.
...
...
@@ -21,7 +21,7 @@
21
21
<para>
22
22
Repeated calls to this function will return a new result each time, until a &false; is returned
23
23
as a signal that there is no more to get at this point. The integer pointed to with
24
-
<parameter>msgs_in_queue</parameter> will contain the number of remaining messages after this
24
+
<parameter>queued_messages</parameter> will contain the number of remaining messages after this
25
25
function was called.
26
26
</para>
27
27
<warning>
...
...
@@ -38,7 +38,7 @@
38
38
<variablelist>
39
39
&curl.mh.description;
40
40
<varlistentry>
41
-
<term><parameter>msgs_in_queue</parameter></term>
41
+
<term><parameter>queued_messages</parameter></term>
42
42
<listitem>
43
43
<para>
44
44
Number of messages that are still in the queue
...
...
@@ -72,7 +72,7 @@
72
72
</row>
73
73
<row>
74
74
<entry><literal>result</literal></entry>
75
-
<entry>One of the <constant>CURLE_*</constant> constants. If everything is
75
+
<entry>One of the <constant>CURLE_<replaceable>*</replaceable></constant> constants. If everything is
76
76
OK, the <constant>CURLE_OK</constant> will be the result.</entry>
77
77
</row>
78
78
<row>
...
...
@@ -85,103 +85,21 @@
85
85
</para>
86
86
</refsect1>
87
87
88
-
<refsect1 role="examples">
89
-
&reftitle.examples;
90
-
<para>
91
-
<example>
92
-
<title>A <function>curl_multi_info_read</function> example</title>
93
-
<programlisting role="php">
94
-
<![CDATA[
95
-
<?php
96
-
97
-
$urls = array(
98
-
"http://www.cnn.com/",
99
-
"http://www.bbc.co.uk/",
100
-
"http://www.yahoo.com/"
101
-
);
102
-
103
-
$mh = curl_multi_init();
104
-
105
-
foreach ($urls as $i => $url) {
106
-
$conn[$i] = curl_init($url);
107
-
curl_setopt($conn[$i], CURLOPT_RETURNTRANSFER, 1);
108
-
curl_multi_add_handle($mh, $conn[$i]);
109
-
}
110
-
111
-
do {
112
-
$status = curl_multi_exec($mh, $active);
113
-
$info = curl_multi_info_read($mh);
114
-
if (false !== $info) {
115
-
var_dump($info);
116
-
}
117
-
} while ($status === CURLM_CALL_MULTI_PERFORM || $active);
118
-
119
-
foreach ($urls as $i => $url) {
120
-
$res[$i] = curl_multi_getcontent($conn[$i]);
121
-
curl_close($conn[$i]);
122
-
}
123
-
124
-
var_dump(curl_multi_info_read($mh));
125
-
126
-
?>
127
-
]]>
128
-
</programlisting>
129
-
&example.outputs.similar;
130
-
<screen>
131
-
<![CDATA[
132
-
array(3) {
133
-
["msg"]=>
134
-
int(1)
135
-
["result"]=>
136
-
int(0)
137
-
["handle"]=>
138
-
resource(5) of type (curl)
139
-
}
140
-
array(3) {
141
-
["msg"]=>
142
-
int(1)
143
-
["result"]=>
144
-
int(0)
145
-
["handle"]=>
146
-
resource(7) of type (curl)
147
-
}
148
-
array(3) {
149
-
["msg"]=>
150
-
int(1)
151
-
["result"]=>
152
-
int(0)
153
-
["handle"]=>
154
-
resource(6) of type (curl)
155
-
}
156
-
bool(false)
157
-
]]>
158
-
</screen>
159
-
</example>
160
-
</para>
161
-
</refsect1>
162
-
163
88
<refsect1 role="changelog">
164
89
&reftitle.changelog;
165
-
<para>
166
-
<informaltable>
167
-
<tgroup cols="2">
168
-
<thead>
169
-
<row>
170
-
<entry>&Version;</entry>
171
-
<entry>&Description;</entry>
172
-
</row>
173
-
</thead>
174
-
<tbody>
175
-
<row>
176
-
<entry>5.2.0</entry>
177
-
<entry>
178
-
<parameter>msgs_in_queue</parameter> was added.
179
-
</entry>
180
-
</row>
181
-
</tbody>
182
-
</tgroup>
183
-
</informaltable>
184
-
</para>
90
+
<informaltable>
91
+
<tgroup cols="2">
92
+
<thead>
93
+
<row>
94
+
<entry>&Version;</entry>
95
+
<entry>&Description;</entry>
96
+
</row>
97
+
</thead>
98
+
<tbody>
99
+
&curl.changelog.multi-handle-param;
100
+
</tbody>
101
+
</tgroup>
102
+
</informaltable>
185
103
</refsect1>
186
104
187
105
<refsect1 role="seealso">
...
...
@@ -194,7 +112,6 @@ bool(false)
194
112
</refsect1>
195
113
196
114
</refentry>
197
-
198
115
<!-- Keep this comment at the end of the file
199
116
Local variables:
200
117
mode: sgml
201
118