WC_Geo_IP
in package
WC_Geo_IP Class.
Tags
Table of Contents
- GEOIP_ACCURACYRADIUS_EDITION = 14
- GEOIP_ASNUM_EDITION = 9
- GEOIP_ASNUM_EDITION_V6 = 21
- GEOIP_CITY_EDITION_REV0 = 6
- GEOIP_CITY_EDITION_REV0_V6 = 31
- GEOIP_CITY_EDITION_REV1 = 2
- GEOIP_CITY_EDITION_REV1_V6 = 30
- GEOIP_COUNTRY_BEGIN = 16776960
- GEOIP_COUNTRY_EDITION = 1
- GEOIP_COUNTRY_EDITION_V6 = 12
- GEOIP_DOMAIN_EDITION = 11
- GEOIP_DOMAIN_EDITION_V6 = 24
- GEOIP_ISP_EDITION = 4
- GEOIP_ISP_EDITION_V6 = 22
- GEOIP_LOCATIONA_EDITION = 13
- GEOIP_MEMORY_CACHE = 1
- GEOIP_NETSPEED_EDITION = 10
- GEOIP_NETSPEED_EDITION_REV1 = 32
- GEOIP_NETSPEED_EDITION_REV1_V6 = 33
- GEOIP_ORG_EDITION = 5
- GEOIP_ORG_EDITION_V6 = 23
- GEOIP_PROXY_EDITION = 8
- GEOIP_REGION_EDITION_REV0 = 7
- GEOIP_REGION_EDITION_REV1 = 3
- GEOIP_SHARED_MEMORY = 2
- GEOIP_SHM_KEY = 0x4f415401
- GEOIP_STATE_BEGIN_REV0 = 16700000
- GEOIP_STATE_BEGIN_REV1 = 16000000
- GEOIP_USERTYPE_EDITION = 28
- GEOIP_USERTYPE_EDITION_V6 = 29
- ORG_RECORD_LENGTH = 4
- SEGMENT_RECORD_LENGTH = 3
- STANDARD_RECORD_LENGTH = 3
- STRUCTURE_INFO_MAX_SIZE = 20
- $databaseSegments : int
- Database segments.
- $databaseType : int
- Database type.
- $filehandle : resource
- File handler.
- $flags : int
- Flags.
- $GEOIP_CONTINENT_CODES : array<string|int, mixed>
- 2 letters continent codes.
- $GEOIP_COUNTRY_CODES : array<string|int, mixed>
- Two letters country codes.
- $GEOIP_COUNTRY_CODES3 : array<string|int, mixed>
- 3 letters country codes.
- $GEOIP_COUNTRY_NAMES : array<string|int, mixed>
- Contry names.
- $log : WC_Logger
- $memory_buffer : string
- Memory buffer.
- $record_length : int
- Record length.
- $shmid : string
- Shmid.
- _geoip_seek_country_v6() : string
- Seek country IPv6.
- geoip_close() : bool
- Close geoip file.
- geoip_country_code_by_addr() : string
- Country code by addr.
- geoip_country_code_by_addr_v6() : string
- Country code by addr IPv6.
- geoip_country_id_by_addr() : int
- Country ID by addr.
- geoip_country_id_by_addr_v6() : int|bool
- Country ID by addr IPv6.
- geoip_open() : mixed
- Open geoip file.
- geoip_record_by_addr() : WC_Geo_IP_Record
- Record by addr.
- log() : mixed
- Logging method.
- _common_get_record() : WC_Geo_IP_Record
- Common get record.
- _geoip_seek_country() : string
- Seek country.
- _get_record() : WC_Geo_IP_Record
- Get record.
- _safe_substr() : string
- Encode string.
- _setup_segments() : WC_Geo_IP
- Setup segments.
Constants
GEOIP_ACCURACYRADIUS_EDITION
public
mixed
GEOIP_ACCURACYRADIUS_EDITION
= 14
GEOIP_ASNUM_EDITION
public
mixed
GEOIP_ASNUM_EDITION
= 9
GEOIP_ASNUM_EDITION_V6
public
mixed
GEOIP_ASNUM_EDITION_V6
= 21
GEOIP_CITY_EDITION_REV0
public
mixed
GEOIP_CITY_EDITION_REV0
= 6
GEOIP_CITY_EDITION_REV0_V6
public
mixed
GEOIP_CITY_EDITION_REV0_V6
= 31
GEOIP_CITY_EDITION_REV1
public
mixed
GEOIP_CITY_EDITION_REV1
= 2
GEOIP_CITY_EDITION_REV1_V6
public
mixed
GEOIP_CITY_EDITION_REV1_V6
= 30
GEOIP_COUNTRY_BEGIN
public
mixed
GEOIP_COUNTRY_BEGIN
= 16776960
GEOIP_COUNTRY_EDITION
public
mixed
GEOIP_COUNTRY_EDITION
= 1
GEOIP_COUNTRY_EDITION_V6
public
mixed
GEOIP_COUNTRY_EDITION_V6
= 12
GEOIP_DOMAIN_EDITION
public
mixed
GEOIP_DOMAIN_EDITION
= 11
GEOIP_DOMAIN_EDITION_V6
public
mixed
GEOIP_DOMAIN_EDITION_V6
= 24
GEOIP_ISP_EDITION
public
mixed
GEOIP_ISP_EDITION
= 4
GEOIP_ISP_EDITION_V6
public
mixed
GEOIP_ISP_EDITION_V6
= 22
GEOIP_LOCATIONA_EDITION
public
mixed
GEOIP_LOCATIONA_EDITION
= 13
GEOIP_MEMORY_CACHE
public
mixed
GEOIP_MEMORY_CACHE
= 1
GEOIP_NETSPEED_EDITION
public
mixed
GEOIP_NETSPEED_EDITION
= 10
GEOIP_NETSPEED_EDITION_REV1
public
mixed
GEOIP_NETSPEED_EDITION_REV1
= 32
GEOIP_NETSPEED_EDITION_REV1_V6
public
mixed
GEOIP_NETSPEED_EDITION_REV1_V6
= 33
GEOIP_ORG_EDITION
public
mixed
GEOIP_ORG_EDITION
= 5
GEOIP_ORG_EDITION_V6
public
mixed
GEOIP_ORG_EDITION_V6
= 23
GEOIP_PROXY_EDITION
public
mixed
GEOIP_PROXY_EDITION
= 8
GEOIP_REGION_EDITION_REV0
public
mixed
GEOIP_REGION_EDITION_REV0
= 7
GEOIP_REGION_EDITION_REV1
public
mixed
GEOIP_REGION_EDITION_REV1
= 3
GEOIP_SHARED_MEMORY
public
mixed
GEOIP_SHARED_MEMORY
= 2
GEOIP_SHM_KEY
public
mixed
GEOIP_SHM_KEY
= 0x4f415401
GEOIP_STATE_BEGIN_REV0
public
mixed
GEOIP_STATE_BEGIN_REV0
= 16700000
GEOIP_STATE_BEGIN_REV1
public
mixed
GEOIP_STATE_BEGIN_REV1
= 16000000
GEOIP_USERTYPE_EDITION
public
mixed
GEOIP_USERTYPE_EDITION
= 28
GEOIP_USERTYPE_EDITION_V6
public
mixed
GEOIP_USERTYPE_EDITION_V6
= 29
ORG_RECORD_LENGTH
public
mixed
ORG_RECORD_LENGTH
= 4
SEGMENT_RECORD_LENGTH
public
mixed
SEGMENT_RECORD_LENGTH
= 3
STANDARD_RECORD_LENGTH
public
mixed
STANDARD_RECORD_LENGTH
= 3
STRUCTURE_INFO_MAX_SIZE
public
mixed
STRUCTURE_INFO_MAX_SIZE
= 20
Properties
$databaseSegments
Database segments.
public
int
$databaseSegments
$databaseType
Database type.
public
int
$databaseType
$filehandle
File handler.
public
resource
$filehandle
$flags
Flags.
public
int
$flags
$GEOIP_CONTINENT_CODES
2 letters continent codes.
public
array<string|int, mixed>
$GEOIP_CONTINENT_CODES
= array('--', 'AS', 'EU', 'EU', 'AS', 'AS', 'NA', 'NA', 'EU', 'AS', 'NA', 'AF', 'AN', 'SA', 'OC', 'EU', 'OC', 'NA', 'AS', 'EU', 'NA', 'AS', 'EU', 'AF', 'EU', 'AS', 'AF', 'AF', 'NA', 'AS', 'SA', 'SA', 'NA', 'AS', 'AN', 'AF', 'EU', 'NA', 'NA', 'AS', 'AF', 'AF', 'AF', 'EU', 'AF', 'OC', 'SA', 'AF', 'AS', 'SA', 'NA', 'NA', 'AF', 'AS', 'AS', 'EU', 'EU', 'AF', 'EU', 'NA', 'NA', 'AF', 'SA', 'EU', 'AF', 'AF', 'AF', 'EU', 'AF', 'EU', 'OC', 'SA', 'OC', 'EU', 'EU', 'NA', 'AF', 'EU', 'NA', 'AS', 'SA', 'AF', 'EU', 'NA', 'AF', 'AF', 'NA', 'AF', 'EU', 'AN', 'NA', 'OC', 'AF', 'SA', 'AS', 'AN', 'NA', 'EU', 'NA', 'EU', 'AS', 'EU', 'AS', 'AS', 'AS', 'AS', 'AS', 'EU', 'EU', 'NA', 'AS', 'AS', 'AF', 'AS', 'AS', 'OC', 'AF', 'NA', 'AS', 'AS', 'AS', 'NA', 'AS', 'AS', 'AS', 'NA', 'EU', 'AS', 'AF', 'AF', 'EU', 'EU', 'EU', 'AF', 'AF', 'EU', 'EU', 'AF', 'OC', 'EU', 'AF', 'AS', 'AS', 'AS', 'OC', 'NA', 'AF', 'NA', 'EU', 'AF', 'AS', 'AF', 'NA', 'AS', 'AF', 'AF', 'OC', 'AF', 'OC', 'AF', 'NA', 'EU', 'EU', 'AS', 'OC', 'OC', 'OC', 'AS', 'NA', 'SA', 'OC', 'OC', 'AS', 'AS', 'EU', 'NA', 'OC', 'NA', 'AS', 'EU', 'OC', 'SA', 'AS', 'AF', 'EU', 'EU', 'AF', 'AS', 'OC', 'AF', 'AF', 'EU', 'AS', 'AF', 'EU', 'EU', 'EU', 'AF', 'EU', 'AF', 'AF', 'SA', 'AF', 'NA', 'AS', 'AF', 'NA', 'AF', 'AN', 'AF', 'AS', 'AS', 'OC', 'AS', 'AF', 'OC', 'AS', 'EU', 'NA', 'OC', 'AS', 'AF', 'EU', 'AF', 'OC', 'NA', 'SA', 'AS', 'EU', 'NA', 'SA', 'NA', 'NA', 'AS', 'OC', 'OC', 'OC', 'AS', 'AF', 'EU', 'AF', 'AF', 'EU', 'AF', '--', '--', '--', 'EU', 'EU', 'EU', 'EU', 'NA', 'NA', 'NA', 'AF', '--')
$GEOIP_COUNTRY_CODES
Two letters country codes.
public
array<string|int, mixed>
$GEOIP_COUNTRY_CODES
= array('', 'AP', 'EU', 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'CW', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BM', 'BN', 'BO', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR', 'SX', 'GA', 'GB', 'GD', 'GE', 'GF', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM', 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RU', 'RW', 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'ST', 'SV', 'SY', 'SZ', 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TM', 'TN', 'TO', 'TL', 'TR', 'TT', 'TV', 'TW', 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU', 'WF', 'WS', 'YE', 'YT', 'RS', 'ZA', 'ZM', 'ME', 'ZW', 'A1', 'A2', 'O1', 'AX', 'GG', 'IM', 'JE', 'BL', 'MF', 'BQ', 'SS', 'O1')
$GEOIP_COUNTRY_CODES3
3 letters country codes.
public
array<string|int, mixed>
$GEOIP_COUNTRY_CODES3
= array('', 'AP', 'EU', 'AND', 'ARE', 'AFG', 'ATG', 'AIA', 'ALB', 'ARM', 'CUW', 'AGO', 'ATA', 'ARG', 'ASM', 'AUT', 'AUS', 'ABW', 'AZE', 'BIH', 'BRB', 'BGD', 'BEL', 'BFA', 'BGR', 'BHR', 'BDI', 'BEN', 'BMU', 'BRN', 'BOL', 'BRA', 'BHS', 'BTN', 'BVT', 'BWA', 'BLR', 'BLZ', 'CAN', 'CCK', 'COD', 'CAF', 'COG', 'CHE', 'CIV', 'COK', 'CHL', 'CMR', 'CHN', 'COL', 'CRI', 'CUB', 'CPV', 'CXR', 'CYP', 'CZE', 'DEU', 'DJI', 'DNK', 'DMA', 'DOM', 'DZA', 'ECU', 'EST', 'EGY', 'ESH', 'ERI', 'ESP', 'ETH', 'FIN', 'FJI', 'FLK', 'FSM', 'FRO', 'FRA', 'SXM', 'GAB', 'GBR', 'GRD', 'GEO', 'GUF', 'GHA', 'GIB', 'GRL', 'GMB', 'GIN', 'GLP', 'GNQ', 'GRC', 'SGS', 'GTM', 'GUM', 'GNB', 'GUY', 'HKG', 'HMD', 'HND', 'HRV', 'HTI', 'HUN', 'IDN', 'IRL', 'ISR', 'IND', 'IOT', 'IRQ', 'IRN', 'ISL', 'ITA', 'JAM', 'JOR', 'JPN', 'KEN', 'KGZ', 'KHM', 'KIR', 'COM', 'KNA', 'PRK', 'KOR', 'KWT', 'CYM', 'KAZ', 'LAO', 'LBN', 'LCA', 'LIE', 'LKA', 'LBR', 'LSO', 'LTU', 'LUX', 'LVA', 'LBY', 'MAR', 'MCO', 'MDA', 'MDG', 'MHL', 'MKD', 'MLI', 'MMR', 'MNG', 'MAC', 'MNP', 'MTQ', 'MRT', 'MSR', 'MLT', 'MUS', 'MDV', 'MWI', 'MEX', 'MYS', 'MOZ', 'NAM', 'NCL', 'NER', 'NFK', 'NGA', 'NIC', 'NLD', 'NOR', 'NPL', 'NRU', 'NIU', 'NZL', 'OMN', 'PAN', 'PER', 'PYF', 'PNG', 'PHL', 'PAK', 'POL', 'SPM', 'PCN', 'PRI', 'PSE', 'PRT', 'PLW', 'PRY', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'SAU', 'SLB', 'SYC', 'SDN', 'SWE', 'SGP', 'SHN', 'SVN', 'SJM', 'SVK', 'SLE', 'SMR', 'SEN', 'SOM', 'SUR', 'STP', 'SLV', 'SYR', 'SWZ', 'TCA', 'TCD', 'ATF', 'TGO', 'THA', 'TJK', 'TKL', 'TKM', 'TUN', 'TON', 'TLS', 'TUR', 'TTO', 'TUV', 'TWN', 'TZA', 'UKR', 'UGA', 'UMI', 'USA', 'URY', 'UZB', 'VAT', 'VCT', 'VEN', 'VGB', 'VIR', 'VNM', 'VUT', 'WLF', 'WSM', 'YEM', 'MYT', 'SRB', 'ZAF', 'ZMB', 'MNE', 'ZWE', 'A1', 'A2', 'O1', 'ALA', 'GGY', 'IMN', 'JEY', 'BLM', 'MAF', 'BES', 'SSD', 'O1')
$GEOIP_COUNTRY_NAMES
Contry names.
public
array<string|int, mixed>
$GEOIP_COUNTRY_NAMES
= array('', 'Asia/Pacific Region', 'Europe', 'Andorra', 'United Arab Emirates', 'Afghanistan', 'Antigua and Barbuda', 'Anguilla', 'Albania', 'Armenia', 'Curacao', 'Angola', 'Antarctica', 'Argentina', 'American Samoa', 'Austria', 'Australia', 'Aruba', 'Azerbaijan', 'Bosnia and Herzegovina', 'Barbados', 'Bangladesh', 'Belgium', 'Burkina Faso', 'Bulgaria', 'Bahrain', 'Burundi', 'Benin', 'Bermuda', 'Brunei Darussalam', 'Bolivia', 'Brazil', 'Bahamas', 'Bhutan', 'Bouvet Island', 'Botswana', 'Belarus', 'Belize', 'Canada', 'Cocos (Keeling) Islands', 'Congo, The Democratic Republic of the', 'Central African Republic', 'Congo', 'Switzerland', "Cote D'Ivoire", 'Cook Islands', 'Chile', 'Cameroon', 'China', 'Colombia', 'Costa Rica', 'Cuba', 'Cape Verde', 'Christmas Island', 'Cyprus', 'Czech Republic', 'Germany', 'Djibouti', 'Denmark', 'Dominica', 'Dominican Republic', 'Algeria', 'Ecuador', 'Estonia', 'Egypt', 'Western Sahara', 'Eritrea', 'Spain', 'Ethiopia', 'Finland', 'Fiji', 'Falkland Islands (Malvinas)', 'Micronesia, Federated States of', 'Faroe Islands', 'France', 'Sint Maarten (Dutch part)', 'Gabon', 'United Kingdom', 'Grenada', 'Georgia', 'French Guiana', 'Ghana', 'Gibraltar', 'Greenland', 'Gambia', 'Guinea', 'Guadeloupe', 'Equatorial Guinea', 'Greece', 'South Georgia and the South Sandwich Islands', 'Guatemala', 'Guam', 'Guinea-Bissau', 'Guyana', 'Hong Kong', 'Heard Island and McDonald Islands', 'Honduras', 'Croatia', 'Haiti', 'Hungary', 'Indonesia', 'Ireland', 'Israel', 'India', 'British Indian Ocean Territory', 'Iraq', 'Iran, Islamic Republic of', 'Iceland', 'Italy', 'Jamaica', 'Jordan', 'Japan', 'Kenya', 'Kyrgyzstan', 'Cambodia', 'Kiribati', 'Comoros', 'Saint Kitts and Nevis', "Korea, Democratic People's Republic of", 'Korea, Republic of', 'Kuwait', 'Cayman Islands', 'Kazakhstan', "Lao People's Democratic Republic", 'Lebanon', 'Saint Lucia', 'Liechtenstein', 'Sri Lanka', 'Liberia', 'Lesotho', 'Lithuania', 'Luxembourg', 'Latvia', 'Libya', 'Morocco', 'Monaco', 'Moldova, Republic of', 'Madagascar', 'Marshall Islands', 'Macedonia', 'Mali', 'Myanmar', 'Mongolia', 'Macau', 'Northern Mariana Islands', 'Martinique', 'Mauritania', 'Montserrat', 'Malta', 'Mauritius', 'Maldives', 'Malawi', 'Mexico', 'Malaysia', 'Mozambique', 'Namibia', 'New Caledonia', 'Niger', 'Norfolk Island', 'Nigeria', 'Nicaragua', 'Netherlands', 'Norway', 'Nepal', 'Nauru', 'Niue', 'New Zealand', 'Oman', 'Panama', 'Peru', 'French Polynesia', 'Papua New Guinea', 'Philippines', 'Pakistan', 'Poland', 'Saint Pierre and Miquelon', 'Pitcairn Islands', 'Puerto Rico', 'Palestinian Territory', 'Portugal', 'Palau', 'Paraguay', 'Qatar', 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', 'Saudi Arabia', 'Solomon Islands', 'Seychelles', 'Sudan', 'Sweden', 'Singapore', 'Saint Helena', 'Slovenia', 'Svalbard and Jan Mayen', 'Slovakia', 'Sierra Leone', 'San Marino', 'Senegal', 'Somalia', 'Suriname', 'Sao Tome and Principe', 'El Salvador', 'Syrian Arab Republic', 'Eswatini', 'Turks and Caicos Islands', 'Chad', 'French Southern Territories', 'Togo', 'Thailand', 'Tajikistan', 'Tokelau', 'Turkmenistan', 'Tunisia', 'Tonga', 'Timor-Leste', 'Turkey', 'Trinidad and Tobago', 'Tuvalu', 'Taiwan', 'Tanzania, United Republic of', 'Ukraine', 'Uganda', 'United States Minor Outlying Islands', 'United States', 'Uruguay', 'Uzbekistan', 'Holy See (Vatican City State)', 'Saint Vincent and the Grenadines', 'Venezuela', 'Virgin Islands, British', 'Virgin Islands, U.S.', 'Vietnam', 'Vanuatu', 'Wallis and Futuna', 'Samoa', 'Yemen', 'Mayotte', 'Serbia', 'South Africa', 'Zambia', 'Montenegro', 'Zimbabwe', 'Anonymous Proxy', 'Satellite Provider', 'Other', 'Aland Islands', 'Guernsey', 'Isle of Man', 'Jersey', 'Saint Barthelemy', 'Saint Martin', 'Bonaire, Saint Eustatius and Saba', 'South Sudan', 'Other')
$log
public
static WC_Logger
$log
= alse
$memory_buffer
Memory buffer.
public
string
$memory_buffer
$record_length
Record length.
public
int
$record_length
$shmid
Shmid.
public
string
$shmid
Methods
_geoip_seek_country_v6()
Seek country IPv6.
public
_geoip_seek_country_v6(int $ipnum) : string
Parameters
- $ipnum : int
Return values
string —geoip_close()
Close geoip file.
public
geoip_close() : bool
Return values
bool —geoip_country_code_by_addr()
Country code by addr.
public
geoip_country_code_by_addr(string $addr) : string
Parameters
- $addr : string
Return values
string —geoip_country_code_by_addr_v6()
Country code by addr IPv6.
public
geoip_country_code_by_addr_v6(string $addr) : string
Parameters
- $addr : string
Return values
string —geoip_country_id_by_addr()
Country ID by addr.
public
geoip_country_id_by_addr(string $addr) : int
Parameters
- $addr : string
Return values
int —geoip_country_id_by_addr_v6()
Country ID by addr IPv6.
public
geoip_country_id_by_addr_v6(string $addr) : int|bool
Parameters
- $addr : string
Return values
int|bool —geoip_open()
Open geoip file.
public
geoip_open(string $filename, int $flags) : mixed
Parameters
- $filename : string
- $flags : int
Return values
mixed —geoip_record_by_addr()
Record by addr.
public
geoip_record_by_addr(string $addr) : WC_Geo_IP_Record
Parameters
- $addr : string
Return values
WC_Geo_IP_Record —log()
Logging method.
public
static log(string $message[, string $level = 'info' ]) : mixed
Parameters
- $message : string
-
Log message.
- $level : string = 'info'
-
Optional. Default 'info'. emergency|alert|critical|error|warning|notice|info|debug
Return values
mixed —_common_get_record()
Common get record.
private
_common_get_record(string $seek_country) : WC_Geo_IP_Record
Parameters
- $seek_country : string
Return values
WC_Geo_IP_Record — instance_geoip_seek_country()
Seek country.
private
_geoip_seek_country(int $ipnum) : string
Parameters
- $ipnum : int
Return values
string —_get_record()
Get record.
private
_get_record(int $ipnum) : WC_Geo_IP_Record
Parameters
- $ipnum : int
Return values
WC_Geo_IP_Record — instance_safe_substr()
Encode string.
private
_safe_substr(string $string, int $start, int $length) : string
Parameters
- $string : string
- $start : int
- $length : int
Return values
string —_setup_segments()
Setup segments.
private
_setup_segments() : WC_Geo_IP