downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/reserved.variables.httpresponseheader.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/reserved.variables.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'reserved.variables.httpresponseheader.php',
   
1 => '$http_response_header',
  ),
 
'up' =>
  array (
   
0 => 'reserved.variables.php',
   
1 => 'Predefined Variables',
  ),
 
'prev' =>
  array (
   
0 => 'reserved.variables.httprawpostdata.php',
   
1 => '$HTTP_RAW_POST_DATA',
  ),
 
'next' =>
  array (
   
0 => 'reserved.variables.argc.php',
   
1 => '$argc',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="reserved.variables.httpresponseheader" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">$http_response_header</h1>
  <p class="refpurpose"><span class="refname">$http_response_header</span> &mdash; <span class="dc-title">HTTP response headers</span></p>

 </div>
 
 <a name="reserved.variables.httpresponseheader.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <p class="para">
   The <var class="varname">$http_response_header</var> <a href="language.types.array.php" class="type array">array</a> is similar to the
   <a href="function.get-headers.php" class="function">get_headers()</a> function. When using the
   <a href="wrappers.http.php" class="link">HTTP wrapper</a>,
   <var class="varname">$http_response_header</var> will be populated with the HTTP
   response headers.
  </p>
 </div>

 
 <a name="reserved.variables.httpresponseheader.examples"></a><div class="refsect1 examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Example #1 <var class="varname">$http_response_header</var> example</b></p>
    <div class="example-contents programlisting">
<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_response_header</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

    <div class="example-contents para"><p>The above example will output
something similar to:</p></div>
    <div class="example-contents screen">
<div class="cdata"><pre>
array(9) {
  [0]=&gt;
  string(15) &quot;HTTP/1.1 200 OK&quot;
  [1]=&gt;
  string(35) &quot;Date: Sat, 12 Apr 2008 17:30:38 GMT&quot;
  [2]=&gt;
  string(29) &quot;Server: Apache/2.2.3 (CentOS)&quot;
  [3]=&gt;
  string(44) &quot;Last-Modified: Tue, 15 Nov 2005 13:24:10 GMT&quot;
  [4]=&gt;
  string(27) &quot;ETag: &quot;280100-1b6-80bfd280&quot;&quot;
  [5]=&gt;
  string(20) &quot;Accept-Ranges: bytes&quot;
  [6]=&gt;
  string(19) &quot;Content-Length: 438&quot;
  [7]=&gt;
  string(17) &quot;Connection: close&quot;
  [8]=&gt;
  string(38) &quot;Content-Type: text/html; charset=UTF-8&quot;
}
</pre></div>
    </div>
   </div><p>
  </p>
 </div>

 
</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites