reference/curl/functions/curl-multi-add-handle.xml
89ae180a851621c308f0ea4604ff2e919aa57a7f
...
...
@@ -10,12 +10,12 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>curl_multi_add_handle</methodname>
13
-
<methodparam><type>resource</type><parameter>mh</parameter></methodparam>
14
-
<methodparam><type>resource</type><parameter>ch</parameter></methodparam>
13
+
<methodparam><type>CurlMultiHandle</type><parameter>multi_handle</parameter></methodparam>
14
+
<methodparam><type>CurlHandle</type><parameter>handle</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
Adds the <parameter>ch</parameter> handle to the multi handle
18
-
<parameter>mh</parameter>
17
+
Adds the <parameter>handle</parameter> handle to the multi handle
18
+
<parameter>multi_handle</parameter>
19
19
</para>
20
20
</refsect1>
21
21
...
...
@@ -32,55 +32,27 @@
32
32
<refsect1 role="returnvalues">
33
33
&reftitle.returnvalues;
34
34
<para>
35
-
Returns 0 on success, or one of the <constant>CURLM_XXX</constant> errors
35
+
Returns 0 on success, or one of the <constant>CURLM_<replaceable>*</replaceable></constant> errors
36
36
code.
37
37
</para>
38
38
</refsect1>
39
39
40
-
<refsect1 role="examples">
41
-
&reftitle.examples;
42
-
<para>
43
-
<example>
44
-
<title><function>curl_multi_add_handle</function> example</title>
45
-
<para>
46
-
This example will create two cURL handles, add them to a multi
47
-
handle, and process them asynchronously.
48
-
</para>
49
-
<programlisting role="php">
50
-
<![CDATA[
51
-
<?php
52
-
// create both cURL resources
53
-
$ch1 = curl_init();
54
-
$ch2 = curl_init();
55
-

56
-
// set URL and other appropriate options
57
-
curl_setopt($ch1, CURLOPT_URL, "http://www.example.com/");
58
-
curl_setopt($ch1, CURLOPT_HEADER, 0);
59
-
curl_setopt($ch2, CURLOPT_URL, "http://www.php.net/");
60
-
curl_setopt($ch2, CURLOPT_HEADER, 0);
61
-

62
-
//create the multiple cURL handle
63
-
$mh = curl_multi_init();
64
-

65
-
//add the two handles
66
-
curl_multi_add_handle($mh,$ch1);
67
-
curl_multi_add_handle($mh,$ch2);
68
-

69
-
$running=null;
70
-
//execute the handles
71
-
do {
72
-
curl_multi_exec($mh,$running);
73
-
} while($running > 0);
74
-

75
-
//close all the handles
76
-
curl_multi_remove_handle($mh, $ch1);
77
-
curl_multi_remove_handle($mh, $ch2);
78
-
curl_multi_close($mh);
79
-
?>
80
-
]]>
81
-
</programlisting>
82
-
</example>
83
-
</para>
40
+
<refsect1 role="changelog">
41
+
&reftitle.changelog;
42
+
<informaltable>
43
+
<tgroup cols="2">
44
+
<thead>
45
+
<row>
46
+
<entry>&Version;</entry>
47
+
<entry>&Description;</entry>
48
+
</row>
49
+
</thead>
50
+
<tbody>
51
+
&curl.changelog.multi-handle-param;
52
+
&curl.changelog.handle-param;
53
+
</tbody>
54
+
</tgroup>
55
+
</informaltable>
84
56
</refsect1>
85
57

86
58
<refsect1 role="seealso">
...
...
@@ -95,7 +67,6 @@ curl_multi_close($mh);
95
67
</refsect1>
96
68

97
69
</refentry>
98
-

99
70
<!-- Keep this comment at the end of the file
100
71
Local variables:
101
72
mode: sgml
102
73