<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.network.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.http-get-last-response-headers.php',
    1 => 'http_get_last_response_headers',
    2 => 'Retrieve last HTTP response headers',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => 'Network Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.http-clear-last-response-headers.php',
    1 => 'http_clear_last_response_headers',
  ),
  'next' => 
  array (
    0 => 'function.http-response-code.php',
    1 => 'http_response_code',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/network/functions/http-get-last-response-headers.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.http-get-last-response-headers" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">http_get_last_response_headers</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">http_get_last_response_headers</span> &mdash; <span class="dc-title">Retrieve last HTTP response headers</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.http-get-last-response-headers-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>http_get_last_response_headers</strong></span>(): <span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.array.php" class="type array">array</a></span></span></div>

  <p class="simpara">
   Returns an <span class="type"><a href="language.types.array.php" class="type array">array</a></span> containing the last <abbr title="Hypertext Transfer Protocol">HTTP</abbr>
   response headers received via the
   <a href="wrappers.http.php" class="link">HTTP wrapper</a>.
   If there are none, <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> is returned instead.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.http-get-last-response-headers-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">Questa funzione non contiene parametri.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.http-get-last-response-headers-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
   Returns an indexed <span class="type"><a href="language.types.array.php" class="type array">array</a></span> of <abbr title="Hypertext Transfer Protocol">HTTP</abbr> headers
   which were received while using the
   <a href="wrappers.http.php" class="link">HTTP wrapper</a>.
   If there are none, <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> is returned instead.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.http-get-last-response-headers-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="function.http-get-last-response-headers.example.basic">
   <p><strong>Example #1 <span class="function"><strong>http_get_last_response_headers()</strong></span> example</strong></p>
   <div class="example-contents"><p>
    Description.
   </p></div>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />file_get_contents</span><span style="color: #007700">(</span><span style="color: #DD0000">"http://example.com"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">http_get_last_response_headers</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>Il precedente esempio visualizzerà
qualcosa simile a:</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">array(14) {
  [0]=&gt;
  string(15) &quot;HTTP/1.1 200 OK&quot;
  [1]=&gt;
  string(20) &quot;Accept-Ranges: bytes&quot;
  [2]=&gt;
  string(11) &quot;Age: 326940&quot;
  [3]=&gt;
  string(29) &quot;Cache-Control: max-age=604800&quot;
  [4]=&gt;
  string(38) &quot;Content-Type: text/html; charset=UTF-8&quot;
  [5]=&gt;
  string(35) &quot;Date: Mon, 11 Nov 2024 13:34:09 GMT&quot;
  [6]=&gt;
  string(23) &quot;Etag: &quot;3147526947+gzip&quot;&quot;
  [7]=&gt;
  string(38) &quot;Expires: Mon, 18 Nov 2024 13:34:09 GMT&quot;
  [8]=&gt;
  string(44) &quot;Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT&quot;
  [9]=&gt;
  string(24) &quot;Server: ECAcc (nyd/D16C)&quot;
  [10]=&gt;
  string(21) &quot;Vary: Accept-Encoding&quot;
  [11]=&gt;
  string(12) &quot;X-Cache: HIT&quot;
  [12]=&gt;
  string(20) &quot;Content-Length: 1256&quot;
  [13]=&gt;
  string(17) &quot;Connection: close&quot;
}</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.http-get-last-response-headers-seealso">
  <h3 class="title">Vedere anche:</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.http-clear-last-response-headers.php" class="function" rel="rdfs-seeAlso">http_clear_last_response_headers()</a> - Clears the stored HTTP response headers</span></li>
  </ul>
 </div>


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