GithubHelp home page GithubHelp logo

marketo / silverstripe-regional-maxmind-geoip-legacy Goto Github PK

View Code? Open in Web Editor NEW
2.0 15.0 1.0 16 KB

Driver allowing the SilverStripe-Regional module to pull data from Maxmind using Net_GeoIP

License: BSD 3-Clause "New" or "Revised" License

PHP 100.00%

silverstripe-regional-maxmind-geoip-legacy's Introduction

Maintainer Contact

Kirk Mayo

<kirk (dot) mayo (at) solnet (dot) co (dot) nz>

Requirements

  • SilverStripe 3.2
  • SilverStripe-Regional Module
  • PHP 5 GeoIP module

SilverStripe-Regional-Maxmind-GeoIP-Legacy

Driver allowing the SilverStripe-Regional module to pull data from Maxmind using GeoIP

Composer Installation

composer require marketo/silverstripe-regional-maxmind-geoip-legacy

Config

You will need to confirm that the MaxMind GeoIP database files have been setup and that you can use the GeoIP function that come with the PHP 5 GeoIP module. Certain versions of the MaxMind GeoIP API module (https://github.com/maxmind/geoip-api-php/) will conflict with the PHP 5 GeoIP functions.

GeoIP database

You will neeed to retrive a databse for the module to work with this will need to be stored on the server and you may need to set the location of GeoPath under IPInfoCache in your config yml file. The free databases can be downloaded from here http://dev.maxmind.com/geoip/legacy/geolite

API endpoints

The curent endpoint returns a JSON object giving location details for the IP address. The results default to json but they can also be returned as jsonp if this has been defined under the config for IPInfoCache

http://YOURSITE/geoip/IPADDRESS
http://YOURSITE/geoip/IPADDRESS.json
http://YOURSITE/geoip/IPADDRESS.jsonp

TODO

Add tests Split up conection methods make it easy to use other connectors and dbs

silverstripe-regional-maxmind-geoip-legacy's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

helpfulrobot

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.