mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 17:08:54 +00:00
Documented ip2long, long2ip with a simple example
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@29935 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
532b86ba1a
commit
862448d51d
1 changed files with 65 additions and 0 deletions
|
@ -575,6 +575,71 @@ if (!fp) {
|
|||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.ip2long">
|
||||
<refnamediv>
|
||||
<refname>ip2long</refname>
|
||||
<refpurpose>
|
||||
Converts a string containing an (IPv4) Internet Protocol dotted address
|
||||
into a proper address.
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>ip2long</function></funcdef>
|
||||
<paramdef>string <parameter>ip_address</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
The function <function>ip2long</function> generates an IPv4 Internet
|
||||
network address from its Internet standard format (dotted string)
|
||||
representation.
|
||||
<example>
|
||||
<title><function>Ip2long</function> Example</title>
|
||||
<programlisting role="php">
|
||||
<?
|
||||
$ip = gethostbyname("www.php.net");
|
||||
$out = "The following URLs are equivalent:<br>\n";
|
||||
$out .= "http://www.php.net/, http://".$ip."/, and http://".ip2long($ip)."/<br>\n";
|
||||
echo $out;
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>long2ip</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.long2ip">
|
||||
<refnamediv>
|
||||
<refname>long2ip</refname>
|
||||
<refpurpose>
|
||||
Converts an (IPv4) Internet network address into a string in Internet
|
||||
standard dotted format
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>long2ip</function></funcdef>
|
||||
<paramdef>int <parameter>proper_address</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
The function <function>long2ip</function> generates an Interned address
|
||||
in dotted format (i.e.: aaa.bbb.ccc.ddd) from the proper address
|
||||
representation.
|
||||
</para>
|
||||
<para>
|
||||
See also: <function>ip2long</function>
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue