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/fr/function.inet-pton.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = 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 => 'fr',
  ),
 
'this' =>
  array (
   
0 => 'function.inet-pton.php',
   
1 => 'inet_pton',
  ),
 
'up' =>
  array (
   
0 => 'ref.network.php',
   
1 => 'Fonctions réseaux',
  ),
 
'prev' =>
  array (
   
0 => 'function.inet-ntop.php',
   
1 => 'inet_ntop',
  ),
 
'next' =>
  array (
   
0 => 'function.ip2long.php',
   
1 => 'ip2long',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.inet-pton" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">inet_pton</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.1.0)</p><p class="refpurpose"><span class="refname">inet_pton</span> &mdash; <span class="dc-title">Convertit une adresse IP lisible en sa représentation in_addr</span></p>

 </div>

 <a name="function.inet-pton.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><b>inet_pton</b></span>
    ( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$address</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Convertit une adresse IPv4 ou IPv6 (si PHP a été compilé avec le
   support IPv6) humainement lisible en une structure binaire
   appropriée de famille d&#039;adresses 32 bit ou 128 bit.
  </p>
 </div>


 <a name="function.inet-pton.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">address</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       Une adresse IPv4 ou IPv6.
      </p>
     </dd>

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


 <a name="function.inet-pton.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Retourne la représentation <i>in_addr</i> de l&#039;adresse
   fournie par le paramètre <i><tt class="parameter">address</tt></i>

  </p>
 </div>


 <a name="function.inet-pton.examples"></a><div class="refsect1 examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   </p><div class="example">
    <p><b>Exemple #1 Exemple avec <b>inet_pton()</b></b></p>
    <div class="example-contents programlisting">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$in_addr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">inet_pton</span><span style="color: #007700">(</span><span style="color: #DD0000">'127.0.0.1'</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$in6_addr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">inet_pton</span><span style="color: #007700">(</span><span style="color: #DD0000">'::1'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

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


 <a name="function.inet-pton.changelog"></a><div class="refsect1 changelog">
  <h3 class="title">Historique</h3>
  <p class="para">
   </p><table class="doctable informaltable">
   
     <thead valign="middle">
      <tr valign="middle">
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody valign="middle" class="tbody">
      <tr valign="middle">
       <td align="left">5.3.0</td>
       <td align="left">
        Cette fonction est maintenant disponible sur les plate-formes Windows.
       </td>
      </tr>

     </tbody>
   
   </table>
<p>
  </p>
 </div>


 <a name="function.inet-pton.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.ip2long.php" class="function" rel="rdfs-seeAlso">ip2long()</a> - Convertit une chaîne contenant une adresse (IPv4) IP numérique en adresse littérale</li>
    <li class="member"><a href="function.long2ip.php" class="function" rel="rdfs-seeAlso">long2ip()</a> - Convertit une adresse IP (IPv4) en adresse IP numérique</li>
    <li class="member"><a href="function.inet-ntop.php" class="function" rel="rdfs-seeAlso">inet_ntop()</a> - Convertit un paquet d'adresses internet en une représentation humainement lisible</li>
   </ul><p>
  </p>
 </div>


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