geoip_continent_code

Синтаксис

enum Continent
{
	CONTINENT_UNKNOWN = 0,
	CONTINENT_AFRICA,
	CONTINENT_ANTARCTICA,
	CONTINENT_ASIA,
	CONTINENT_EUROPE,
	CONTINENT_NORTH_AMERICA,
	CONTINENT_OCEANIA,
	CONTINENT_SOUTH_AMERICA,
};
native Continent:geoip_continent_code(const ip[], result[3]);

Употреба

ip
The IP address to look up.
result
The result of the geoip look up.

Описание

Look up the continent code for a given IP address.

Забележка

This native requires GeoIP City database, which can be retrieved from:
http://dev.maxmind.com/geoip/geoip2/geolite2/ (MaxMind DB binary)

Забележка

The code can be retrieved as integer (See CONTINENT_* constants.) or string (2 characters).

Забележка

Possible continent codes are AF, AN, AS, EU, NA, OC, SA for
Africa(1), Antarctica(2), Asia(3), Europe(4), North America(5), Oceania(6), South America(7).

Връщаща стойност

The continent id on successful lookup, 0 otherwise.