2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2004-08-20 16:05:06 +00:00
|
|
|
<!-- $Revision: 1.7 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<!-- splitted from ./en/functions/network.xml, last change in rev 1.2 -->
|
|
|
|
<refentry id="function.gethostbyaddr">
|
|
|
|
<refnamediv>
|
|
|
|
<refname>gethostbyaddr</refname>
|
|
|
|
<refpurpose>
|
|
|
|
Get the Internet host name corresponding to a given IP address
|
|
|
|
</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<refsect1>
|
|
|
|
<title>Description</title>
|
|
|
|
<methodsynopsis>
|
|
|
|
<type>string</type><methodname>gethostbyaddr</methodname>
|
|
|
|
<methodparam><type>string</type><parameter>ip_address</parameter></methodparam>
|
|
|
|
</methodsynopsis>
|
|
|
|
<para>
|
|
|
|
Returns the host name of the Internet host specified by
|
2003-01-07 22:42:28 +00:00
|
|
|
<parameter>ip_address</parameter> or a string containing the unmodified
|
|
|
|
<parameter>ip_address</parameter> on failure.
|
2002-04-15 00:12:54 +00:00
|
|
|
</para>
|
2003-02-15 00:58:55 +00:00
|
|
|
<para>
|
|
|
|
<example>
|
|
|
|
<title>A simple <function>gethostbyaddr</function> example</title>
|
|
|
|
<programlisting role="php">
|
|
|
|
<![CDATA[
|
2003-02-15 01:05:22 +00:00
|
|
|
<?php
|
2003-02-15 00:58:55 +00:00
|
|
|
$hostname = gethostbyaddr($_SERVER['REMOTE_ADDR']);
|
|
|
|
|
2003-12-15 16:55:22 +00:00
|
|
|
echo $hostname;
|
2003-02-15 00:58:55 +00:00
|
|
|
?>
|
2003-02-15 01:05:22 +00:00
|
|
|
]]>
|
2003-02-15 00:58:55 +00:00
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
</para>
|
2002-04-15 00:12:54 +00:00
|
|
|
<para>
|
2004-08-20 16:05:06 +00:00
|
|
|
See also <function>gethostbyname</function>, and
|
|
|
|
<function>gethostbynamel</function>.
|
2002-04-15 00:12:54 +00:00
|
|
|
</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
|
|
|
|
-->
|