cvs: phpdoc /en/reference/network/functions gethostbynamel.xml
| From: | Damien Seguy | Date: | Tue, 27 May 2003 03:10:21 +0000 |
| Subject: | cvs: phpdoc /en/reference/network/functions gethostbynamel.xml | ||
| Groups: | php.doc | ||
| Request: | Send a blank email to phpdoc+get-969353924@lists.php.net to get a copy of this message | ||
dams Mon May 26 23:10:21 2003 EDT
Modified files:
/phpdoc/en/reference/network/functions gethostbynamel.xml
Log:
adding example
Index: phpdoc/en/reference/network/functions/gethostbynamel.xml
diff -u phpdoc/en/reference/network/functions/gethostbynamel.xml:1.2
phpdoc/en/reference/network/functions/gethostbynamel.xml:1.3
--- phpdoc/en/reference/network/functions/gethostbynamel.xml:1.2 Wed Apr 17 02:42:03 2002
+++ phpdoc/en/reference/network/functions/gethostbynamel.xml Mon May 26 23:10:20 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/network.xml, last change in rev 1.2 -->
<refentry id="function.gethostbynamel">
<refnamediv>
@@ -19,6 +19,35 @@
Returns a list of IP addresses to which the Internet host
specified by <parameter>hostname</parameter> resolves.
</para>
+ <example>
+ <title><function>gethostbynamel</function> example</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+ $hosts = gethostbynamel('www.yahoo.com');
+ print_r($hosts);
+?>
+]]>
+ </programlisting>
+ <para>
+ The printout of the above program will be:
+ <screen>
+<![CDATA[
+Array
+(
+ [0] => 216.109.125.67
+ [1] => 64.58.76.228
+ [2] => 216.109.125.65
+ [3] => 216.109.125.70
+ [4] => 64.58.76.226
+ [5] => 64.58.76.230
+ [6] => 64.58.76.222
+ [7] => 216.109.125.66
+)
+]]>
+ </screen>
+ </para>
+ </example>
<para>
See also <function>gethostbyname</function>,
<function>gethostbyaddr</function>,