pollita         Sat Aug  7 01:13:16 2004 EDT

  Added files:                 
    /phpdoc/en/reference/network/functions      inet-ntop.xml inet-pton.xml 
  Log:
  Document inet_pton() and inet_aton()
  

http://cvs.php.net/co.php/phpdoc/en/reference/network/functions/inet-ntop.xml?r=1.1&p=1
Index: phpdoc/en/reference/network/functions/inet-ntop.xml
+++ phpdoc/en/reference/network/functions/inet-ntop.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
  <refentry id="function.inet-ntop">
   <refnamediv>
    <refname>inet_ntop</refname>
    <refpurpose>
      Converts a packed internet address to a human readable representation
    </refpurpose> 
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>inet_ntop</methodname>
      <methodparam><type>string</type><parameter>in_addr</parameter></methodparam>
     </methodsynopsis>
    <simpara>
     This function converts a 32bit IPv4, or 128bit IPv6 address (if PHP
     was built with IPv6 support enabled) into an address family appropriate 
     string representation.  Returns &false; on failure.
    </simpara>
    <example>
     <title><function>inet_ntop</function> Example</title>
     <programlisting role="php">
<![CDATA[
<?php
$packed = chr(127) . chr(0) . chr(0) . chr(1);
$expanded = inet_pton($packed);

/* Outputs: 127.0.0.1 */
echo $expanded;

$packed = str_repeat(chr(0), 15) . chr(1);
$expanded = inet_pton($packed);

/* Outputs: ::1 */
echo $expanded;
?>
]]>
     </programlisting>
    </example>
    </note>
    <para>
     See also <function>long2ip</function>,
     <function>inet_pton</function>, and
     <function>ip2long</function>.
    </para>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

http://cvs.php.net/co.php/phpdoc/en/reference/network/functions/inet-pton.xml?r=1.1&p=1
Index: phpdoc/en/reference/network/functions/inet-pton.xml
+++ phpdoc/en/reference/network/functions/inet-pton.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
  <refentry id="function.inet-pton">
   <refnamediv>
    <refname>inet_pton</refname>
    <refpurpose>
      Converts a human readable IP address to its packed in_addr representation
    </refpurpose> 
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>inet_pton</methodname>
      <methodparam><type>string</type><parameter>address</parameter></methodparam>
     </methodsynopsis>
    <simpara>
     This function converts a human readable IPv4 or IPv6 address (if PHP
     was built with IPv6 support enabled) into an address family appropriate
     32bit or 128bit binary structure.
    </simpara>
    <example>
     <title><function>inet_pton</function> Example</title>
     <programlisting role="php">
<![CDATA[
<?php
$in_addr = inet_pton('127.0.0.1');

$in6_addr = inet_pton('::1');

?>
]]>
     </programlisting>
    </example>
    </note>
    <para>
     See also <function>ip2long</function>,
     <function>inet_ntop</function>, and
     <function>long2ip</function>.
    </para>
   </refsect1>
  </refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->

Reply via email to