Welcome to Centmin Mod Community
Register Now

Very slow Geo IP?

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

  1. Oxide

    Oxide Active Member

    505
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    7:24 AM
    solved - please close
     
    Last edited: Apr 10, 2016
  2. Oxide

    Oxide Active Member

    505
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    7:24 AM
    pls coaaaaa
     
    Last edited: Apr 10, 2016
  3. Oxide

    Oxide Active Member

    505
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    7:24 AM
    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

    505
    29
    28
    Mar 19, 2015
    Ratings:
    +54
    Local Time:
    7:24 AM
    Figured out why.

    Gethostbyaddr seems to be slow..