<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.imap.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.imap-fetchheader.php',
    1 => 'imap_fetchheader',
    2 => 'Retourne l\'en-t&ecirc;te d\'un message',
  ),
  'up' => 
  array (
    0 => 'ref.imap.php',
    1 => 'Fonctions IMAP',
  ),
  'prev' => 
  array (
    0 => 'function.imap-fetchbody.php',
    1 => 'imap_fetchbody',
  ),
  'next' => 
  array (
    0 => 'function.imap-fetchmime.php',
    1 => 'imap_fetchmime',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/imap/functions/imap-fetchheader.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imap-fetchheader" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_fetchheader</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imap_fetchheader</span> &mdash; <span class="dc-title">Retourne l&#039;en-tête d&#039;un message</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-fetchheader-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imap_fetchheader</strong></span>(<span class="methodparam"><span class="type"><a href="class.imap-connection.php" class="type IMAP\Connection">IMAP\Connection</a></span> <code class="parameter">$imap</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$message_num</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>imap_fetchheader()</strong></span> retourne l&#039;en-tête brut et
   complet <a href="https://datatracker.ietf.org/doc/html/rfc2822" class="link external">&raquo;&nbsp;RFC2822</a> du message
   <code class="parameter">msgno</code>, sous la forme d&#039;une chaîne.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.imap-fetchheader-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
<dt><code class="parameter">imap</code></dt><dd><p class="para">
 Une instance de <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span>.
</p></dd>
    
     <dt><code class="parameter">message_num</code></dt>
     <dd>
      <p class="para">
       Le numéro du message
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Les options possibles sont :
       <ul class="itemizedlist">
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="imap.constants.php#constant.ft-uid">FT_UID</a></code></strong> - <code class="parameter">message_num</code> est un UID
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="imap.constants.php#constant.ft-internal">FT_INTERNAL</a></code></strong> - La chaîne renvoyée est
          au format &quot;internal&quot; , c&#039;est-à-dire sans canonisation des CRLF
         </span>
        </li>
        <li class="listitem">
         <span class="simpara">
          <strong><code><a href="imap.constants.php#constant.ft-prefetchtext">FT_PREFETCHTEXT</a></code></strong> - RFC822.TEXT doit être pré
          téléchargé en même temps que l&#039;en-tête.
          Cela réduit le RTT sur une connexion <abbr title="Internet Message Access Protocol">IMAP</abbr>, si
          le message complet est souhaité. (p. ex. dans une opération
          de sauvegarde dans un fichier).
         </span>
        </li>
       </ul>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.imap-fetchheader-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne l&#039;en-tête du message spécifié, sous la forme d&#039;une <a href="language.types.string.php" class="link">chaîne de caractères</a>,  ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-fetchheader-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.1.0</td>
 <td>
  La paramètre <code class="parameter">imap</code> attend désormais une instance de
  <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span> ; auparavant, une <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="literal">imap</code> était attendue.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.imap-fetchheader-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.imap-fetch-overview.php" class="function" rel="rdfs-seeAlso">imap_fetch_overview()</a> - Lit le sommaire des en-t&ecirc;tes de messages</span></li>
   </ul>
  </p>
 </div>

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