mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-26 13:58:55 +00:00
99 lines
2.4 KiB
XML
99 lines
2.4 KiB
XML
![]() |
<?xml version="1.0" encoding="iso-8859-1"?>
|
||
|
<!-- $Revision: 1.1 $ -->
|
||
|
<refentry id="function.geoip-org-by-name">
|
||
|
<refnamediv>
|
||
|
<refname>geoip_org_by_name</refname>
|
||
|
<refpurpose>Get the organization name</refpurpose>
|
||
|
</refnamediv>
|
||
|
<refsect1 role="description">
|
||
|
&reftitle.description;
|
||
|
<methodsynopsis>
|
||
|
<type>string</type><methodname>geoip_org_by_name</methodname>
|
||
|
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||
|
</methodsynopsis>
|
||
|
|
||
|
<para>
|
||
|
The <function>geoip_org_by_name</function> function will return the name of
|
||
|
the organization that an IP is assigned to.
|
||
|
</para>
|
||
|
<para>
|
||
|
This function is currently only available to users who have bought a commercial
|
||
|
GeoIP Organization, ISP or AS Edition. A warning will be issued if the proper
|
||
|
database cannot be located.
|
||
|
</para>
|
||
|
|
||
|
</refsect1>
|
||
|
<refsect1 role="parameters">
|
||
|
&reftitle.parameters;
|
||
|
<para>
|
||
|
<variablelist>
|
||
|
<varlistentry>
|
||
|
<term><parameter>hostname</parameter></term>
|
||
|
<listitem>
|
||
|
<para>
|
||
|
The hostname or IP address.
|
||
|
</para>
|
||
|
</listitem>
|
||
|
</varlistentry>
|
||
|
</variablelist>
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
<refsect1 role="returnvalues">
|
||
|
&reftitle.returnvalues;
|
||
|
<para>
|
||
|
Returns the organization name on success, or &false; if the address
|
||
|
cannot be found in the database.
|
||
|
</para>
|
||
|
</refsect1>
|
||
|
|
||
|
<refsect1 role="examples">
|
||
|
&reftitle.examples;
|
||
|
<para>
|
||
|
<example>
|
||
|
<title>A <function>geoip_org_by_name</function> example</title>
|
||
|
<para>
|
||
|
This will print to whom the host example.com IP is allocated.
|
||
|
</para>
|
||
|
<programlisting role="php">
|
||
|
<![CDATA[
|
||
|
<?php
|
||
|
$org = geoip_country_code_by_name('www.example.com');
|
||
|
if ($org) {
|
||
|
echo 'This host IP is allocated to: ' . $org;
|
||
|
}
|
||
|
?>
|
||
|
]]>
|
||
|
</programlisting>
|
||
|
&example.outputs;
|
||
|
<screen>
|
||
|
<![CDATA[
|
||
|
This host IP is allocated to: ICANN c/o Internet Assigned Numbers Authority
|
||
|
]]>
|
||
|
</screen>
|
||
|
</example>
|
||
|
</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
|
||
|
-->
|