1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help me with MaxMind ?

Discussion in 'Blogging' started by lovejesus, Aug 13, 2016.

  1. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
    Hi,
    i want to know the user country code using their IP address ,
    i tried many free API's but all of them has limited usage So i decided to use Maxmind but the problem is
    i dont know how to use it .

    Anyone can Help me how i can setup Maxmind to know user country or with API ?
    P.s i want to use PHP .
    Thanks,
    Have a nice day everyone!
     
  2. arsen99

    arsen99 Jr. VIP Jr. VIP

    Joined:
    Nov 28, 2010
    Messages:
    311
    Likes Received:
    47
    Home Page:
  3. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
    Hi arsen, Thank you for responsding .
    Im aware of php and also the functions to get the IP address of user but the problem here is my im not getting it how to implement their API on my server as they have provided a GeoIP.dat file which my hosting service is not recognizing :/

    P.s im not Hostgator shared hosting
     
  4. roadhamster

    roadhamster Regular Member

    Joined:
    Mar 12, 2012
    Messages:
    348
    Likes Received:
    248
  5. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
  6. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
    resolved^
    instead of using composer , i manually specified the path of geoip.inc .
    Working as expected.
     
  7. MuayThai

    MuayThai Jr. VIP Jr. VIP

    Joined:
    Aug 25, 2015
    Messages:
    637
    Likes Received:
    190
    Congratulations! By the way, MaxMind is right choice!
     
  8. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
    Thank you, Yes heard a lot .
    Currently using their free database which is in .dat format

    Their paid service offers which database format , Do you have any idea ? because if they provide in .dat format then it will work but if its in some other format then im not sure whether it will work or nor :/.

    One more Question , For general use; is their free database are good ?
     
    • Thanks Thanks x 1
  9. davids355

    davids355 Jr. VIP Jr. VIP

    Joined:
    Apr 25, 2011
    Messages:
    10,422
    Likes Received:
    8,121
    Only ever used the batch online check and not the api, but I can say it's a great service.
     
  10. arsen99

    arsen99 Jr. VIP Jr. VIP

    Joined:
    Nov 28, 2010
    Messages:
    311
    Likes Received:
    47
    Home Page:
    This is great service and if you do not need to have always up to date data the free option is good enough.
     
    • Thanks Thanks x 1
  11. JJJackson

    JJJackson Jr. VIP Jr. VIP

    Joined:
    May 21, 2016
    Messages:
    466
    Likes Received:
    291
    Occupation:
    Gatekeeper
    Home Page:
    If all you want to know is the user country code based on their IP, you can use this: http://stackoverflow.com/a/13600004 - Works great for me (you can also get verious diffrent info based on ip, just look at the example)
     
  12. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
    They are using http://www.geoplugin.net api , the problem with them is you are allowed to send only 2 request per second . They have limited usage . This is why i wanted to go with database option
     
  13. PickAWriter

    PickAWriter Newbie

    Joined:
    Aug 16, 2016
    Messages:
    24
    Likes Received:
    3
    Home Page:
    You can go the free option and download the geo ip downloadable db - http://dev.maxmind.com/geoip/geoip2/geolite2/
     
  14. lovejesus

    lovejesus Regular Member

    Joined:
    Jul 28, 2013
    Messages:
    200
    Likes Received:
    25
    Occupation:
    Freelancer
    Location:
    UK
    Currently using their free database which is in .dat format .
    The one you mentioned is in mmdb and csv .
    i am not sure whether mmdb will work with the api im currently using , its worth giving a shot though . will try using format of mmdb database
     
  15. PickAWriter

    PickAWriter Newbie

    Joined:
    Aug 16, 2016
    Messages:
    24
    Likes Received:
    3
    Home Page:
    It's very easy to load a csv file into a MySQL db. It is a compatible format.
     
  16. privateloader

    privateloader BANNED BANNED

    Joined:
    Nov 12, 2014
    Messages:
    134
    Likes Received:
    32
    They don't offer free demo anymore