php-doc-en/reference/geoip/functions/geoip-asnum-by-name.xml
Christoph Michael Becker 54bf715af3 Fix example
Patch provided by Laurent B.

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@344977 c90b9560-bf6c-de11-be94-00142212c4b1
2018-05-08 11:37:38 +00:00

94 lines
2.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.geoip-asnum-by-name" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>geoip_asnum_by_name</refname>
<refpurpose>Get the Autonomous System Numbers (ASN)</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>string</type><methodname>geoip_asnum_by_name</methodname>
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
</methodsynopsis>
<para>
The <function>geoip_asnum_by_name</function> function will return the Autonomous
System Numbers (ASN) associated with an IP address.
</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 ASN 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_asnum_by_name</function> example</title>
<para>
This will output the ASN of the host www.example.com.
</para>
<programlisting role="php">
<![CDATA[
<?php
$asn = geoip_asnum_by_name('www.example.com');
if ($asn) {
echo 'The ASN is: ' . $asn;
}
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
The ASN is: AS15133 EdgeCast Networks, Inc
]]>
</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:"~/.phpdoc/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
-->