Skip to content

Instantly share code, notes, and snippets.

@megabayt
Last active November 28, 2017 05:50
Show Gist options
  • Save megabayt/19d67c93bec477014f1a5bba4d67f16f to your computer and use it in GitHub Desktop.
Save megabayt/19d67c93bec477014f1a5bba4d67f16f to your computer and use it in GitHub Desktop.
include_once "library/sxgeo/SxGeo.php";
$sxGeoBase = "library/sxgeo/SxGeoCity.dat";
$sxGeo = new SxGeo($sxGeoBase, SXGEO_BATCH | SXGEO_MEMORY);
$city = $sxGeo->getCity($this->request->server['REMOTE_ADDR'])['city']['name_ru'];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment