Learn about Centmin Mod LEMP Stack today
Become a Member

Very slow Geo IP?

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Oxide, Apr 10, 2016.

  1. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    2:11 PM
    solved - please close

     
    Last edited: Apr 10, 2016
  2. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    2:11 PM
    pls coaaaaa
     
    Last edited: Apr 10, 2016
  3. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    2:11 PM
    Code:
    $geoip_country_code = getenv(GEOIP_COUNTRY_CODE);
    /*
    $geoip_country_code = $_SERVER['GEOIP_COUNTRY_CODE']; // works as well
    */
    $geoip_country_code3 = getenv(GEOIP_COUNTRY_CODE3);
    $geoip_country_name = getenv(GEOIP_COUNTRY_NAME);   
    $geoip_city_country_code = getenv(GEOIP_CITY_COUNTRY_CODE);
    $geoip_city_country_code3 = getenv(GEOIP_CITY_COUNTRY_CODE3);
    $geoip_city_country_name = getenv(GEOIP_CITY_COUNTRY_NAME);
    $geoip_region = getenv(GEOIP_REGION);
    $geoip_city = getenv(GEOIP_CITY);
    $geoip_postal_code = getenv(GEOIP_POSTAL_CODE);
    $geoip_city_continent_code = getenv(GEOIP_CITY_CONTINENT_CODE);
    $geoip_latitude = getenv(GEOIP_LATITUDE);
    $geoip_longitude = getenv(GEOIP_LONGITUDE);    
    Seems to work fast (normal). No idea what's goin on
     
  4. Oxide

    Oxide Active Member

    534
    29
    28
    Mar 19, 2015
    Ratings:
    +59
    Local Time:
    2:11 PM
    Figured out why.

    Gethostbyaddr seems to be slow..