<?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 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.imap-fetchstructure.php',
    1 => 'imap_fetchstructure',
    2 => 'Read the structure of a particular message',
  ),
  'up' => 
  array (
    0 => 'ref.imap.php',
    1 => 'IMAP Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.imap-fetchmime.php',
    1 => 'imap_fetchmime',
  ),
  'next' => 
  array (
    0 => 'function.imap-fetchtext.php',
    1 => 'imap_fetchtext',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/imap/functions/imap-fetchstructure.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.imap-fetchstructure" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">imap_fetchstructure</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">imap_fetchstructure</span> &mdash; <span class="dc-title">Read the structure of a particular message</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.imap-fetchstructure-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>imap_fetchstructure</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="class.stdclass.php" class="type stdClass">stdClass</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Fetches all the structured information for a given message. 
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.imap-fetchstructure-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    <dt>
<code class="parameter">imap</code></dt><dd><p class="para">An <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span> instance.</p></dd>
    
     <dt><code class="parameter">message_num</code></dt>
     <dd>
      <p class="para">
       The message number
      </p>
     </dd>
    
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       This optional parameter only has a single option, 
       <strong><code><a href="imap.constants.php#constant.ft-uid">FT_UID</a></code></strong>, which tells the function to treat the
       <code class="parameter">message_num</code> argument as a 
       <code class="literal">UID</code>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.imap-fetchstructure-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Returns an object with properties listed in the table below,  o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>
     Returned Object for <span class="function"><strong>imap_fetchstructure()</strong></span>
    </strong></caption>
    
     <tbody class="tbody">
      <tr>
       <td>type</td>
       <td>Primary body type</td>
      </tr>

      <tr>
       <td>encoding</td>
       <td>Body transfer encoding</td>
      </tr>

      <tr>
       <td>ifsubtype</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if there is a subtype string</td>
      </tr>

      <tr>
       <td>subtype</td>
       <td><abbr title="Multipurpose Internet Mail Extensions">MIME</abbr> subtype</td>
      </tr>

      <tr>
       <td>ifdescription</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if there is a description string</td>
      </tr>

      <tr>
       <td>description</td>
       <td>Content description string</td>
      </tr>

      <tr>
       <td>ifid</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if there is an identification string</td>
      </tr>

      <tr>
       <td>id</td>
       <td>Identification string</td>
      </tr>

      <tr>
       <td>lines</td>
       <td>Number of lines</td>
      </tr>

      <tr>
       <td>bytes</td>
       <td>Number of bytes</td>
      </tr>

      <tr>
       <td>ifdisposition</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if there is a disposition string</td>
      </tr>

      <tr>
       <td>disposition</td>
       <td>Disposition string</td>
      </tr>

      <tr>
       <td>ifdparameters</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the <var class="varname">dparameters</var> array exists</td>
      </tr>

      <tr>
       <td>dparameters</td>
       <td>An array of objects where each object has an
        <code class="literal">&quot;attribute&quot;</code> and a <code class="literal">&quot;value&quot;</code>
        property corresponding to the parameters on the
        <code class="literal">Content-disposition</code> <abbr title="Multipurpose Internet Mail Extensions">MIME</abbr>
        header.</td>
      </tr>

      <tr>
       <td>ifparameters</td>
       <td><strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> if the parameters array exists</td>
      </tr>

      <tr>
       <td>parameters</td>
       <td>An array of objects where each object has an
        <code class="literal">&quot;attribute&quot;</code> and a <code class="literal">&quot;value&quot;</code>
        property.</td>
      </tr>

      <tr>
       <td>parts</td>
       <td>An array of objects identical in structure to the top-level
       object, each of which corresponds to a <abbr title="Multipurpose Internet Mail Extensions">MIME</abbr> body
       part.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Primary body type (value may vary with used library, use of constants is recommended)</strong></caption>
    
     <thead>
      <tr><th>Value</th><th>Type</th><th>Constant</th></tr>

     </thead>

     <tbody class="tbody">
      <tr><td>0</td><td>text</td><td>TYPETEXT</td></tr>

      <tr><td>1</td><td>multipart</td><td>TYPEMULTIPART</td></tr>

      <tr><td>2</td><td>message</td><td>TYPEMESSAGE</td></tr>

      <tr><td>3</td><td>application</td><td>TYPEAPPLICATION</td></tr>

      <tr><td>4</td><td>audio</td><td>TYPEAUDIO</td></tr>

      <tr><td>5</td><td>image</td><td>TYPEIMAGE</td></tr>

      <tr><td>6</td><td>video</td><td>TYPEVIDEO</td></tr>

      <tr><td>7</td><td>model</td><td>TYPEMODEL</td></tr>

      <tr><td>8</td><td>other</td><td>TYPEOTHER</td></tr>

     </tbody>
    
   </table>

  </p>
  <p class="para">
   <table class="doctable table">
    <caption><strong>Transfer encodings (value may vary with used library, use of constants is recommended)</strong></caption>
    
     <thead>
      <tr><th>Value</th><th>Type</th><th>Constant</th></tr>

     </thead>

     <tbody class="tbody">
      <tr><td>0</td><td>7bit</td><td>ENC7BIT</td></tr>

      <tr><td>1</td><td>8bit</td><td>ENC8BIT</td></tr>

      <tr><td>2</td><td>Binary</td><td>ENCBINARY</td></tr>

      <tr><td>3</td><td>Base64</td><td>ENCBASE64</td></tr>

      <tr><td>4</td><td>Quoted-Printable</td><td>ENCQUOTEDPRINTABLE</td></tr>

      <tr><td>5</td><td>other</td><td>ENCOTHER</td></tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.imap-fetchstructure-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.1.0</td>
 <td>
  The <code class="parameter">imap</code> parameter expects an <span class="classname"><a href="class.imap-connection.php" class="classname">IMAP\Connection</a></span>
  instance now; previously, a valid <code class="literal">imap</code> <a href="language.types.resource.php" class="link">resource</a> was expected.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>

 
 <div class="refsect1 seealso" id="refsect1-function.imap-fetchstructure-seealso">
  <h3 class="title">Vedere anche:</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.imap-fetchbody.php" class="function" rel="rdfs-seeAlso">imap_fetchbody()</a> - Fetch a particular section of the body of the message</span></li>
    <li><span class="function"><a href="function.imap-bodystruct.php" class="function" rel="rdfs-seeAlso">imap_bodystruct()</a> - Read the structure of a specified body section of a specific message</span></li>
   </ul>
  </p>
 </div>

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