Sponsored Content
Full Discussion: apache2 mod_geoip upgrade
Top Forums Web Development apache2 mod_geoip upgrade Post 302350973 by Neo on Sunday 6th of September 2009 04:21:54 PM
Old 09-06-2009
Ah! Thanks.

In that case, I'll install apache2-prefork-dev and then manually rebuild mod_geoip.

Thanks!

---------- Post updated at 19:04 ---------- Previous update was at 18:58 ----------

FYI, the reason I am upgrading mod_geoip is that the current version does not support GEOIP_CONTINENT_CODE

Reference:

MaxMind Forum :: View topic - GEOIP_CONTINENT_CODE ?

---------- Post updated at 20:20 ---------- Previous update was at 19:04 ----------

OK, done.

mod_geoip upgraded and we are getting the continent code as well as country codes, example from phpinfo()

Code:
_SERVER["GEOIP_ADDR"]	123.456.789.123
_SERVER["GEOIP_CONTINENT_CODE"]	NA
_SERVER["GEOIP_COUNTRY_CODE"]	US
_SERVER["GEOIP_COUNTRY_NAME"]	United States



---------- Post updated at 20:21 ---------- Previous update was at 20:20 ----------

FYI, reference country code / continent code:

Code:
AP,AS
EU,EU
AD,EU
AE,AS
AF,AS
AG,SA
AI,SA
AL,EU
AM,AS
AN,SA
AO,AF
AQ,AN
AR,SA
AS,OC
AT,EU
AU,OC
AW,SA
AX,EU
AZ,AS
BA,EU
BB,SA
BD,AS
BE,EU
BF,AF
BG,EU
BH,AS
BI,AF
BJ,AF
BM,SA
BN,AS
BO,SA
BR,SA
BS,SA
BT,AS
BV,AF
BW,AF
BY,EU
BZ,SA
CA,NA
CC,AS
CD,AF
CF,AF
CG,AF
CH,EU
CI,AF
CK,OC
CL,SA
CM,AF
CN,AS
CO,SA
CR,SA
CU,SA
CV,AF
CX,AS
CY,AS
CZ,EU
DE,EU
DJ,AF
DK,EU
DM,SA
DO,SA
DZ,AF
EC,SA
EE,EU
EG,AF
EH,AF
ER,AF
ES,EU
ET,AF
FI,EU
FJ,OC
FK,SA
FM,OC
FO,EU
FR,EU
FX,EU
GA,AF
GB,EU
GD,SA
GE,AS
GF,SA
GG,EU
GH,AF
GI,EU
GL,SA
GM,AF
GN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for this . i have sun fire v880 server with configuration metioned below sun fire v880 2*750 MHz UltraSPARC 111 with 4 GB Memory ( 256*16 ) 36*6 GB hard disks( Internal) with other configuration and now i need to upgrade this server.... (3 Replies)
Discussion started by: dhasanka
3 Replies

2. AIX

OS upgrade

Hello, fellows: I have an old H80 with AIX 4.3, I want to upgrade to AIX 5.3, is this possible? I have read in some documentation that is necesary do it version to version, I mean... 4.3->5.1 5.1->5.2 5.2->5.3, anybody have this experience? I will aprecciate yor help. Kind regards. (2 Replies)
Discussion started by: GEIER
2 Replies

3. HP-UX

How to upgrade HP UX 11.22 to 11.23

Hello! I need to upgrade my HP-UX box to latest version, however I dont have any idea how to do it. Somebody can help me here? :D (3 Replies)
Discussion started by: jembalang
3 Replies

4. Red Hat

Upgrade from OL 6.3 to 6.5

Hello, For upgrading from OL 6.3 to 6.5 is this possible to upgrade without rebuild? What should be the generic steps in migration to OL 6.5. IS this like building up from scratch ? Best regards, Vishal (4 Replies)
Discussion started by: admin_db
4 Replies
GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)				 1				  GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)

geoip_time_zone_by_country_and_region - Returns the time zone for some country and region code combo

SYNOPSIS
string geoip_time_zone_by_country_and_region (string $country_code, [string $region_code]) DESCRIPTION
The geoip_time_zone_by_country_and_region(3) function will return the time zone corresponding to a country and region code combo. 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. For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions. You can check http://www.maxmind.com/app/fips10_4 for a detailed list of FIPS 10-4 codes. 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. PARAMETERS
o $country_code - The two-letter country code (see geoip_country_code_by_name(3)) o $region_code - The two-letter (or digit) region code (see geoip_region_by_name(3)) RETURN VALUES
Returns the time zone on success, or FALSE if the country and region code combo cannot be found. EXAMPLES
Example #1 A geoip_time_zone_by_country_and_region(3) example using region code for US/Canada This will print the time zone for country CA (Canada), region QC (Quebec). <?php $timezone = geoip_time_zone_by_country_and_region('CA', 'QC'); if ($timezone) { echo 'Time zone for CA/QC is: ' . $timezone; } ?> The above example will output: Time zone for CA/QC is: America/Montreal Example #2 A geoip_time_zone_by_country_and_region(3) example using FIPS codes This will print the time zone for country JP (Japan), region 01 (Aichi). <?php $timezone = geoip_time_zone_by_country_and_region('JP', '01'); if ($timezone) { echo 'Time zone for JP/01 is: ' . $timezone; } ?> The above example will output: Time zone for JP/01 is: Asia/Tokyo PHP Documentation Group GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)
All times are GMT -4. The time now is 02:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy