<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.curl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.curl-multi-close.php',
    1 => 'curl_multi_close',
    2 => 'Chiude un set di gestori cURL',
  ),
  'up' => 
  array (
    0 => 'ref.curl.php',
    1 => 'cURL Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.curl-multi-add-handle.php',
    1 => 'curl_multi_add_handle',
  ),
  'next' => 
  array (
    0 => 'function.curl-multi-errno.php',
    1 => 'curl_multi_errno',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/curl/functions/curl-multi-close.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.curl-multi-close" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">curl_multi_close</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">curl_multi_close</span> &mdash; <span class="dc-title">Chiude un set di gestori cURL</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.curl-multi-close-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>curl_multi_close</strong></span>(<span class="methodparam"><span class="type"><a href="class.curlmultihandle.php" class="type CurlMultiHandle">CurlMultiHandle</a></span> <code class="parameter">$multi_handle</code></span>): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <blockquote class="note"><p><strong class="note">Nota</strong>: 
 <p class="para">
  This function has no effect. Prior to PHP 8.0.0, this function was used to close the resource.
 </p>
</p></blockquote>

  <p class="para">
   Chiude un set di gestori cURL.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.curl-multi-close-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    <dt><code class="parameter">mh</code>
</dt><dd><p class="para">Un identificativo multiplo rstituito da
<span class="function"><a href="function.curl-multi-init.php" class="function">curl_multi_init()</a></span>.</p></dd>
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.curl-multi-close-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Nessun valore viene restituito.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.curl-multi-close-changelog">
  <h3 class="title">Log delle modifiche</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versione</th>
      <th>Descrizione</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">multi_handle</code> expects a <span class="classname"><a href="class.curlmultihandle.php" class="classname">CurlMultiHandle</a></span>
  instance now; previously, a <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> was expected.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.curl-multi-close-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Esempio di <span class="function"><strong>curl_multi_close()</strong></span></strong></p>
    <div class="example-contents"><p>
     Questo esempio creerà due gestori cURL, li aggiunge ad un gestore
     multiplo, e dopo li esegue in modo asincrono.
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">// crea entrambe le risorse di cURL<br /></span><span style="color: #0000BB">$ch1 </span><span style="color: #007700">= </span><span style="color: #0000BB">curl_init</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$ch2 </span><span style="color: #007700">= </span><span style="color: #0000BB">curl_init</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">// imposta l'URL e altre opzioni appropriate<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$ch1</span><span style="color: #007700">, </span><span style="color: #0000BB">CURLOPT_URL</span><span style="color: #007700">, </span><span style="color: #DD0000">"http://www.example.com/"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$ch1</span><span style="color: #007700">, </span><span style="color: #0000BB">CURLOPT_HEADER</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$ch2</span><span style="color: #007700">, </span><span style="color: #0000BB">CURLOPT_URL</span><span style="color: #007700">, </span><span style="color: #DD0000">"http://www.php.net/"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_setopt</span><span style="color: #007700">(</span><span style="color: #0000BB">$ch2</span><span style="color: #007700">, </span><span style="color: #0000BB">CURLOPT_HEADER</span><span style="color: #007700">, </span><span style="color: #0000BB">0</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//crea il gestore cURL multiplo<br /></span><span style="color: #0000BB">$mh </span><span style="color: #007700">= </span><span style="color: #0000BB">curl_multi_init</span><span style="color: #007700">();<br /><br /></span><span style="color: #FF8000">//aggiunge i due gestori<br /></span><span style="color: #0000BB">curl_multi_add_handle</span><span style="color: #007700">(</span><span style="color: #0000BB">$mh</span><span style="color: #007700">,</span><span style="color: #0000BB">$ch1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_multi_add_handle</span><span style="color: #007700">(</span><span style="color: #0000BB">$mh</span><span style="color: #007700">,</span><span style="color: #0000BB">$ch2</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//esegue i gestori multiplo<br /></span><span style="color: #007700">do {<br />    </span><span style="color: #0000BB">$status </span><span style="color: #007700">= </span><span style="color: #0000BB">curl_multi_exec</span><span style="color: #007700">(</span><span style="color: #0000BB">$mh</span><span style="color: #007700">, </span><span style="color: #0000BB">$active</span><span style="color: #007700">);<br />    if (</span><span style="color: #0000BB">$active</span><span style="color: #007700">) {<br />        </span><span style="color: #0000BB">curl_multi_select</span><span style="color: #007700">(</span><span style="color: #0000BB">$mh</span><span style="color: #007700">);<br />    }<br />} while (</span><span style="color: #0000BB">$active </span><span style="color: #007700">&amp;&amp; </span><span style="color: #0000BB">$status </span><span style="color: #007700">== </span><span style="color: #0000BB">CURLM_OK</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//chiude i gestori<br /></span><span style="color: #0000BB">curl_multi_remove_handle</span><span style="color: #007700">(</span><span style="color: #0000BB">$mh</span><span style="color: #007700">, </span><span style="color: #0000BB">$ch1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$ch1</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_multi_remove_handle</span><span style="color: #007700">(</span><span style="color: #0000BB">$mh</span><span style="color: #007700">, </span><span style="color: #0000BB">$ch2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$ch2</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">curl_multi_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$mh</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.curl-multi-close-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.curl-multi-init.php" class="function" rel="rdfs-seeAlso">curl_multi_init()</a> - Restituisce un nuovo handle multiplo cURL</span></li>
    <li><span class="function"><a href="function.curl-close.php" class="function" rel="rdfs-seeAlso">curl_close()</a> - Chiude una sessione cURL</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>