Skip to content

hotleadorg/sypexgeo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Lightweight, dependency-less SypexGeo module

Differences with base module:

Installation

composer require xiaklizrum/sypexgeo

Usage

Example:

<?php
    use SypexGeo\SxGeo;
    $pathOfYouDbFile = './SxGeoCityMax.dat';
    $geo = new SxGeo($pathOfYouDbFile);
    var_dump($geo->getCityFull('188.93.132.196'));
?>

Output:

array (size=3)
  'city' => 
    array (size=5)
      'id' => int 2022890
      'lat' => float 48.48272
      'lon' => float 135.08379
      'name_ru' => string 'Хабаровск' (length=18)
      'name_en' => string 'Khabarovsk' (length=10)
  'region' => 
    array (size=4)
      'id' => int 2022888
      'name_ru' => string 'Хабаровский край' (length=31)
      'name_en' => string 'Khabarovskiy Kray' (length=17)
      'iso' => string 'RU-KHA' (length=6)
  'country' => 
    array (size=6)
      'id' => int 185
      'iso' => string 'RU' (length=2)
      'lat' => int 60
      'lon' => int 100
      'name_ru' => string 'Россия' (length=12)
      'name_en' => string 'Russia' (length=6)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%