<?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 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.inet-pton.php',
    1 => 'inet_pton',
    2 => 'Konvertiert eine IP-Adresse im menschenlesbaren Format in eine komprimierte
   in_addr-Darstellung',
  ),
  'up' => 
  array (
    0 => 'ref.network.php',
    1 => 'Netzwerk-Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.inet-ntop.php',
    1 => 'inet_ntop',
  ),
  'next' => 
  array (
    0 => 'function.ip2long.php',
    1 => 'ip2long',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/network/functions/inet-pton.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<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, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">inet_pton</span> &mdash; <span class="dc-title">
   Konvertiert eine IP-Adresse im menschenlesbaren Format in eine komprimierte
   in_addr-Darstellung
  </span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.inet-pton-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>inet_pton</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$ip</code></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">
   Die Funktion konvertiert eine menschenlesbare IPv4- oder IPv6-Adresse
   (sofern PHP mit IPv6-Support kompiliert wurde) in eine für die
   Adressfamilie geeignete 32-bittige oder 128-bittige Binärstruktur.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.inet-pton-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">ip</code></dt>
     <dd>
      <p class="para">
       Eine menschenlesbare IPv4- oder IPv6-Adresse.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.inet-pton-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt die <code class="literal">in_addr</code>-Darstellung der übergebenen
   <code class="parameter">ip</code> zurück oder <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>, wenn eine syntaktisch
   ungültige <code class="parameter">ip</code> angegeben wurde, z. B. eine IPv4-Adresse
   ohne Punkte oder eine IPv6-Adresse ohne Doppelpunkte.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.inet-pton-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>inet_pton()</strong></span>-Beispiel</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$in_addr </span><span style="color: #007700">= </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 </span><span style="color: #007700">= </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>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.inet-pton-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ip2long.php" class="function" rel="rdfs-seeAlso">ip2long()</a> - Konvertiert eine gem&auml;&szlig; IPv4-Protokoll angegebene IP-Adresse vom
   Punkt-Format in ein Long Integer</span></li>
    <li><span class="function"><a href="function.long2ip.php" class="function" rel="rdfs-seeAlso">long2ip()</a> - Konvertiert eine Long-Integer-Adresse in einen String, der das (IPv4)
   Internet-Standard-Punktformat enth&auml;lt (&quot;Dotted-Format&quot;)</span></li>
    <li><span class="function"><a href="function.inet-ntop.php" class="function" rel="rdfs-seeAlso">inet_ntop()</a> - Konvertiert eine komprimierte IP-Adresse in ein menschenlesbares Format</span></li>
   </ul>
  </p>
 </div>


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