Git Product home page Git Product logo

geo-ip-ru-ipgeobase's Introduction

NAME
    Geo::IP::RU::IpGeoBase - look up location by IP address in Russia

DESCRIPTION
    This module allows you to look up location in DB provided by
    http://ipgeobase.ru service. Access to the DB is free. Contains
    information about city, region, federal district and coordinates.

    DB provided as plain text files and is not very suitable for look ups
    without loading all data into memory. Instead it's been decided to
    import data into a database. Use command line utility to create and
    update back-end DB.

    At this moment DB can be created in SQLite, mysql and Pg. If you create
    table manually then probably module will just work. It's very easy to
    add support for more back-end DBs. Patches are welcome.

METHODS
  new
    Returns a new object. Takes a hash with options, mostly description of
    the back-end:

        Geo::IP::RU::IpGeoBase->new( db => {
            dbh => $dbh, table => 'my_table',
        } );
        # or
        Geo::IP::RU::IpGeoBase->new( db => {
            dsn => 'dbi:mysql:mydb',
            user => 'root', pass => 'secret',
            table => 'my_table',
        } );

    *   dbh - connected DBI handle, or you can use dsn.

    *   dsn, user, pass - DSN like described in DBI, for example
        'dbi:SQLite:my.db', user name and his password.

    *   table - name of the table with data, default is 'ip_geo_base_ru'.

  find_by_ip
    Takes an IP in 'xxx.xxx.xxx.xxx' format and returns information about
    blocks that contains this IP. Yep, blocks, not a block. In theory DB may
    contain intersecting blocks.

    Each record is a hash reference with the fields matching table columns:
    istart, iend, start, end, city, region, federal_district, latitude and
    longitude.

AUTHOR
    Ruslan Zakirov >[email protected]<

LICENSE
    Under the same terms as perl itself.

geo-ip-ru-ipgeobase's People

Contributors

ruz avatar sharifulin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.