mirror of
https://github.com/php/doc-en.git
synced 2026-03-23 23:32:18 +01:00
geoip: fix XML by converting para to simpara tags via script (#5131)
This commit is contained in:
committed by
GitHub
parent
1742a682cd
commit
9d2fd3237a
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<book xml:id="book.geoip" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<book xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="book.geoip">
|
||||
<?phpdoc extension-membership="pecl" ?>
|
||||
<title>Geo IP Location</title>
|
||||
<titleabbrev>GeoIP</titleabbrev>
|
||||
|
||||
<preface xml:id="intro.geoip">
|
||||
&reftitle.intro;
|
||||
<para>
|
||||
<simpara>
|
||||
The GeoIP extension allows you to find the location of an IP address. City,
|
||||
State, Country, Longitude, Latitude, and other information as all, such as
|
||||
State, Country, Longitude, Latitude, and other information as all, such as
|
||||
ISP and connection type can be obtained with the help of GeoIP.
|
||||
</para>
|
||||
</simpara>
|
||||
<warning>
|
||||
<para>
|
||||
<simpara>
|
||||
This extension does not support MaxMind's current "GeoIP2" databases,
|
||||
only the "GeoIP legacy" database files.
|
||||
</para>
|
||||
</simpara>
|
||||
</warning>
|
||||
</preface>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
<appendix xml:id="geoip.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<appendix xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="geoip.constants">
|
||||
&reftitle.constants;
|
||||
&extension.constants;
|
||||
<variablelist>
|
||||
@@ -126,9 +126,9 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>
|
||||
<simpara>
|
||||
The following constants are for net speed:
|
||||
</para>
|
||||
</simpara>
|
||||
<variablelist>
|
||||
<varlistentry xml:id="constant.geoip-unknown-speed">
|
||||
<term>
|
||||
@@ -136,7 +136,7 @@
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara></simpara>
|
||||
<simpara/>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.geoip-dialup-speed">
|
||||
@@ -145,7 +145,7 @@
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara></simpara>
|
||||
<simpara/>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.geoip-cabledsl-speed">
|
||||
@@ -154,7 +154,7 @@
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara></simpara>
|
||||
<simpara/>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry xml:id="constant.geoip-corporate-speed">
|
||||
@@ -163,12 +163,11 @@
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara></simpara>
|
||||
<simpara/>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</appendix>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_asnum_by_name</function> function will return the Autonomous
|
||||
System Numbers (ASN) associated with an IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -24,28 +24,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the ASN on success, or &false; if the address
|
||||
cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_asnum_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will output the ASN of the host www.example.com.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_continent_code_by_name</function> function will return
|
||||
the two letter continent code corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -24,19 +24,19 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address whose location is to be looked-up.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the two letter continent code on success, or &false; if the
|
||||
address cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
<table>
|
||||
<title>Continent codes</title>
|
||||
<tgroup cols="2">
|
||||
@@ -84,9 +84,9 @@
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_continent_code_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print where the host example.com is located.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_country_code_by_name</function> function will return
|
||||
the two letter country code corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -24,28 +24,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address whose location is to be looked-up.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the two letter ISO country code on success, or &false;
|
||||
if the address cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_country_code_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print where the host example.com is located.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
@@ -68,11 +68,11 @@ This host is located in: US
|
||||
<refsect1 role="notes">
|
||||
&reftitle.notes;
|
||||
<caution>
|
||||
<para>
|
||||
<simpara>
|
||||
Please see
|
||||
<link xlink:href="&url.maxmind.iso3166;">&url.maxmind.iso3166;</link> for
|
||||
a complete list of possible return values, including special codes.
|
||||
</para>
|
||||
</simpara>
|
||||
</caution>
|
||||
</refsect1>
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_country_code3_by_name</function> function will return the
|
||||
three letter country code corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -24,28 +24,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address whose location is to be looked-up.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the three letter country code on success, or &false;
|
||||
if the address cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_country_code3_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print where the host example.com is located.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_country_name_by_name</function> function will return the
|
||||
full country name corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -24,28 +24,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address whose location is to be looked-up.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the country name on success, or &false; if the address cannot
|
||||
be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_country_name_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print where the host example.com is located.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
<methodparam choice="opt"><type>int</type><parameter>database</parameter><initializer>GEOIP_COUNTRY_EDITION</initializer></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_database_info</function> function returns the corresponding
|
||||
GeoIP Database version as it is defined inside the binary file.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
If this function is called without arguments, it returns the version
|
||||
of the GeoIP Free Country Edition.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -29,11 +29,11 @@
|
||||
<varlistentry>
|
||||
<term><parameter>database</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The database type as an integer. You can use the
|
||||
<link linkend="geoip.constants">various constants</link> defined with
|
||||
this extension (ie: GEOIP_*_EDITION).
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -41,18 +41,18 @@
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the corresponding database version, or &null; on error.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_database_info</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will output information regarding the database.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,14 +12,14 @@
|
||||
<methodparam><type>int</type><parameter>database</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_db_avail</function> function returns if the corresponding
|
||||
GeoIP Database is available and can be opened on disk.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
It does not indicate if the file is a proper database, only if it is readable.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -28,11 +28,11 @@
|
||||
<varlistentry>
|
||||
<term><parameter>database</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The database type as an integer. You can use the
|
||||
<link linkend="geoip.constants">various constants</link> defined with
|
||||
this extension (ie: GEOIP_*_EDITION).
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -40,18 +40,18 @@
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns &true; is database exists, &false; if not found, or &null; on error.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_db_avail</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will output the current database version string.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
<methodparam><type>int</type><parameter>database</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_db_filename</function> function returns the filename of
|
||||
the corresponding GeoIP Database.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
It does not indicate if the file exists or not on disk, only where the library
|
||||
is looking for the database.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -29,11 +29,11 @@
|
||||
<varlistentry>
|
||||
<term><parameter>database</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The database type as an integer. You can use the
|
||||
<link linkend="geoip.constants">various constants</link> defined with
|
||||
this extension (ie: GEOIP_*_EDITION).
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -41,18 +41,18 @@
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the filename of the corresponding database, or &null; on error.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_db_filename</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will output the filename of the corresponding database.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,18 +12,18 @@
|
||||
<void/>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_db_get_all_info</function> function will return
|
||||
detailed information as a multi-dimensional array about all the
|
||||
GeoIP database types.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is available even if no databases are installed. It
|
||||
will simply list them as non-available.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
The names of the different keys of the returning associative array are as follows:
|
||||
</para>
|
||||
</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
@@ -53,18 +53,18 @@
|
||||
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the associative array.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_db_get_all_info</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the array containing all the information.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
@@ -107,9 +107,9 @@ array(11) {
|
||||
|
||||
<example>
|
||||
<title>A <function>geoip_db_get_all_info</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
You can use the various constants as keys to get only parts of the information.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_domain_by_name</function> function will return the second level
|
||||
domain names associated with a hostname or an IP address.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is currently only available to users who have bought a commercial
|
||||
GeoIP Domain Edition. A warning will be issued if the proper database cannot be
|
||||
located.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -29,28 +29,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the domain name on success, or &false; if the address
|
||||
cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_domain_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will output the domain associated with IP 61.106.139.1.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,13 +12,13 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_id_by_name</function> function will return the Internet
|
||||
connection type corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
The return value is numeric and can be compared to the following constants:
|
||||
</para>
|
||||
</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
@@ -49,27 +49,27 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address whose connection type is to be looked-up.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the connection type.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_id_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will output the connection type of the host example.com.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_isp_by_name</function> function will return the name of
|
||||
the Internet Service Provider (ISP) that an IP is assigned to.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is currently only available to users who have bought a commercial
|
||||
GeoIP ISP Edition. A warning will be issued if the proper database cannot be
|
||||
located.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -29,28 +29,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the ISP name on success, or &false; if the address
|
||||
cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_isp_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the ISP name of host example.com.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,21 +12,21 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_netspeedcell_by_name</function> function will return the Internet
|
||||
connection type and speed corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is only available if using GeoIP Library version 1.4.8 or newer.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is currently only available to users who have bought a commercial
|
||||
GeoIP NetSpeedCell Edition. A warning will be issued if the proper database cannot be
|
||||
located.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
The return value is a string, common values are:
|
||||
</para>
|
||||
</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
@@ -57,28 +57,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the connection speed on success, or &false; if the address
|
||||
cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_netspeedcell_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will output the connection speed of the host example.com.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,15 +12,15 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_org_by_name</function> function will return the name of
|
||||
the organization that an IP is assigned to.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
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>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -29,28 +29,28 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the organization name on success, or &false; if the address
|
||||
cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_org_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print to whom the host example.com IP is allocated.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,18 +12,18 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_record_by_name</function> function will return the
|
||||
record information corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is available for both GeoLite City Edition and commercial GeoIP
|
||||
City Edition. A warning will be issued if the proper database cannot be
|
||||
located.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
The names of the different keys of the returning associative array are as follows:
|
||||
</para>
|
||||
</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
@@ -93,19 +93,19 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address whose record is to be looked-up.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the associative array on success, or &false; if the address
|
||||
cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="changelog">
|
||||
@@ -140,9 +140,9 @@
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_record_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the array containing the record of host example.com.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,18 +12,18 @@
|
||||
<methodparam><type>string</type><parameter>hostname</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_region_by_name</function> function will return the country
|
||||
and region corresponding to a hostname or an IP address.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is currently only available to users who have bought a commercial
|
||||
GeoIP Region Edition. A warning will be issued if the proper database cannot be
|
||||
located.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
The names of the different keys of the returning associative array are as follows:
|
||||
</para>
|
||||
</simpara>
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<simpara>
|
||||
@@ -44,29 +44,29 @@
|
||||
<varlistentry>
|
||||
<term><parameter>hostname</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The hostname or IP address whose region is to be looked-up.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the associative array on success, or &false; if the address
|
||||
cannot be found in the database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_region_by_name</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the array containing the country code and region
|
||||
of the host example.com.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -13,24 +13,24 @@
|
||||
<methodparam><type>string</type><parameter>region_code</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_region_name_by_code</function> function will return the region
|
||||
name corresponding to a country and region code combo.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
In the United States, the region code corresponds to the two-letter abbreviation
|
||||
of each state. In Canada, the region code corresponds to the two-letter province or
|
||||
territory code as attributed by Canada Post.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions.
|
||||
You can check <link xlink:href="&url.maxmind.fips;">&url.maxmind.fips;</link>
|
||||
for a detailed list of FIPS 10-4 codes.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is always available if using GeoIP Library version 1.4.1 or newer. The
|
||||
data is taken directly from the GeoIP Library and not from any database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
@@ -38,29 +38,29 @@
|
||||
<varlistentry>
|
||||
<term><parameter>country_code</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The two-letter country code (see
|
||||
<function>geoip_country_code_by_name</function>)
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>region_code</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The two-letter (or digit) region code (see
|
||||
<function>geoip_region_by_name</function>)
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the region name on success, or &false; if the country and region code
|
||||
combo cannot be found.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
@@ -68,9 +68,9 @@
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>geoip_region_name_by_code</function> example using region code for US/Canada</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the region name for country CA (Canada), region QC (Quebec).
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
@@ -90,9 +90,9 @@ Region name for CA/QC is: Quebec
|
||||
</example>
|
||||
<example>
|
||||
<title>A <function>geoip_region_name_by_code</function> example using FIPS codes</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the region name for country JP (Japan), region 01.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
<methodparam><type>string</type><parameter>path</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_setup_custom_directory</function> function will change the
|
||||
default directory of the GeoIP database. This is equivalent to changing
|
||||
<link linkend="ini.geoip.custom-directory">geoip.custom_directory</link>.
|
||||
</para>
|
||||
</simpara>
|
||||
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
@@ -25,27 +25,27 @@
|
||||
<varlistentry>
|
||||
<term><parameter>path</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The full path of where the GeoIP database is on disk.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
&return.void;
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
&reftitle.examples;
|
||||
<example>
|
||||
<title>A <function>geoip_setup_custom_directory</function> example</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will change the GeoIP default database path.
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -13,24 +13,24 @@
|
||||
<methodparam choice="opt"><type>string</type><parameter>region_code</parameter></methodparam>
|
||||
</methodsynopsis>
|
||||
|
||||
<para>
|
||||
<simpara>
|
||||
The <function>geoip_time_zone_by_country_and_region</function> function will return the
|
||||
time zone corresponding to a country and region code combo.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
In the United States, the region code corresponds to the two-letter abbreviation
|
||||
of each state. In Canada, the region code corresponds to the two-letter province or
|
||||
territory code as attributed by Canada Post.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions.
|
||||
You can check <link xlink:href="&url.maxmind.fips;">&url.maxmind.fips;</link>
|
||||
for a detailed list of FIPS 10-4 codes.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
This function is always available if using GeoIP Library version 1.4.1 or newer. The
|
||||
data is taken directly from the GeoIP Library and not from any database.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
<refsect1 role="parameters">
|
||||
&reftitle.parameters;
|
||||
@@ -38,29 +38,29 @@
|
||||
<varlistentry>
|
||||
<term><parameter>country_code</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The two-letter country code (see
|
||||
<function>geoip_country_code_by_name</function>)
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><parameter>region_code</parameter></term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
The two-letter (or digit) region code (see
|
||||
<function>geoip_region_by_name</function>)
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</refsect1>
|
||||
<refsect1 role="returnvalues">
|
||||
&reftitle.returnvalues;
|
||||
<para>
|
||||
<simpara>
|
||||
Returns the time zone on success, or &false; if the country and region code
|
||||
combo cannot be found.
|
||||
</para>
|
||||
</simpara>
|
||||
</refsect1>
|
||||
|
||||
<refsect1 role="examples">
|
||||
@@ -68,9 +68,9 @@
|
||||
<para>
|
||||
<example>
|
||||
<title>A <function>geoip_time_zone_by_country_and_region</function> example using region code for US/Canada</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the time zone for country CA (Canada), region QC (Quebec).
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
@@ -90,9 +90,9 @@ Time zone for CA/QC is: America/Montreal
|
||||
</example>
|
||||
<example>
|
||||
<title>A <function>geoip_time_zone_by_country_and_region</function> example using FIPS codes</title>
|
||||
<para>
|
||||
<simpara>
|
||||
This will print the time zone for country JP (Japan), region 01 (Aichi).
|
||||
</para>
|
||||
</simpara>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
<type>string</type>
|
||||
</term>
|
||||
<listitem>
|
||||
<para>
|
||||
<simpara>
|
||||
Empty by default, but can be set to force a different database path than the one compiled in the library.
|
||||
</para>
|
||||
</simpara>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
@@ -1,40 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- $Revision$ -->
|
||||
|
||||
<chapter xml:id="geoip.setup" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="geoip.setup">
|
||||
&reftitle.setup;
|
||||
|
||||
<section xml:id="geoip.requirements">
|
||||
&reftitle.required;
|
||||
<para>
|
||||
<simpara>
|
||||
This extension requires the GeoIP C library version 1.4.0 or higher to be
|
||||
installed. You can grab the latest version from
|
||||
<link xlink:href="&url.maxmind.geoip;">&url.maxmind.geoip;</link>
|
||||
and compile it yourself.
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
By default, you will only have access to the Free GeoIP Country or GeoLite
|
||||
City databases. While this module can work with other types of database,
|
||||
you must buy a commercial license from
|
||||
<link xlink:href="&url.maxmind;">Maxmind</link>.
|
||||
</para>
|
||||
</simpara>
|
||||
</section>
|
||||
|
||||
<section xml:id="geoip.installation">
|
||||
&reftitle.install;
|
||||
<para>
|
||||
<simpara>
|
||||
&pecl.moved;
|
||||
</para>
|
||||
<para>
|
||||
</simpara>
|
||||
<simpara>
|
||||
&pecl.info;
|
||||
<link xlink:href="&url.pecl.package;geoip">&url.pecl.package;geoip</link>.
|
||||
</para>
|
||||
</simpara>
|
||||
</section>
|
||||
|
||||
&reference.geoip.ini;
|
||||
|
||||
</chapter>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
mode: sgml
|
||||
@@ -55,4 +53,3 @@ vim600: syn=xml fen fdm=syntax fdl=2 si
|
||||
vim: et tw=78 syn=sgml
|
||||
vi: ts=1 sw=1
|
||||
-->
|
||||
|
||||
|
||||
Reference in New Issue
Block a user