Skip to content

Commit 7b4dbe5

Browse files
committed
Sync a cURL doc page
1 parent db2d94d commit 7b4dbe5

File tree

1 file changed

+1
-49
lines changed

1 file changed

+1
-49
lines changed

reference/curl/functions/curl-multi-add-handle.xml

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<!-- EN-Revision: b7f8c11e56ff1c57a2993e2ed7e5c5ace18637fd Maintainer: pastore Status: ready -->
2+
<!-- EN-Revision: 92226911a09278dd440b836583bf382c629cfc63 Maintainer: pastore Status: ready -->
33
<!-- CREDITS: darvina -->
44
<refentry xml:id="function.curl-multi-add-handle" xmlns="http://docbook.org/ns/docbook">
55
<refnamediv>
@@ -55,55 +55,7 @@
5555
</tgroup>
5656
</informaltable>
5757
</refsect1>
58-
59-
<refsect1 role="examples">
60-
&reftitle.examples;
61-
<para>
62-
<example>
63-
<title>Esempio di <function>curl_multi_add_handle</function></title>
64-
<para>
65-
Questo esempio creerà due gestori di cURL, gli aggiungerà al gestore
66-
multiplo, e successivamente li eseguirà in modo asincrono.
67-
</para>
68-
<programlisting role="php">
69-
<![CDATA[
70-
<?php
71-
// crea entrambe le risorse cURL
72-
$ch1 = curl_init();
73-
$ch2 = curl_init();
74-
75-
// imposta l'URL e altre opzioni appropriate
76-
curl_setopt($ch1, CURLOPT_URL, "http://www.example.com/");
77-
curl_setopt($ch1, CURLOPT_HEADER, 0);
78-
curl_setopt($ch2, CURLOPT_URL, "http://www.php.net/");
79-
curl_setopt($ch2, CURLOPT_HEADER, 0);
80-
81-
//crea il gestore cURL multiplo
82-
$mh = curl_multi_init();
83-
84-
//aggiunge i due gestori
85-
curl_multi_add_handle($mh,$ch1);
86-
curl_multi_add_handle($mh,$ch2);
8758

88-
//esegue i gestori multiplo
89-
do {
90-
$status = curl_multi_exec($mh, $active);
91-
if ($active) {
92-
curl_multi_select($mh);
93-
}
94-
} while ($active && $status == CURLM_OK);
95-
96-
//chiude tutti i gestori
97-
curl_multi_remove_handle($mh, $ch1);
98-
curl_multi_remove_handle($mh, $ch2);
99-
curl_multi_close($mh);
100-
?>
101-
]]>
102-
</programlisting>
103-
</example>
104-
</para>
105-
</refsect1>
106-
10759
<refsect1 role="seealso">
10860
&reftitle.seealso;
10961
<para>

0 commit comments

Comments
 (0)