Xuups
Get an account!     Login

Utilities

Main menu

Who's Online

25 user(s) are online (7 user(s) are browsing Forum)

Members: 0
Guests: 25

more...

Get Xoops

Support Xuups Project


Browsing this Thread:   1 Anonymous Users





Membership: MaxMind GeoIP instead of ip-to-country
Just popping in
Joined:
2008/11/29 1:33
Group:
Registered Users
Posts: 3
Offline
Aloha,

Would it be possible to use MaxMind GeoIP instead of the ip-to-country?

GeoIP is updated at the start of each month and there's no need to import a hugh cvs file into the database.

You only need the GeoIP.inc binary (GeoIP.dat) and the PHP API )geoip.inc).

Also, I remember that SMD or Comflash had the idea to convert Memberstats into a webcounter module. Is this maybe an idea?

Posted on: 2008/12/2 23:02
Transfer the post to other applications Transfer


Re: Membership: MaxMind GeoIP instead of ip-to-country
Moderator
Joined:
2008/6/2 19:00
Group:
Webmasters
Registered Users
Posts: 48
Offline
Great idea

I'm looking for similar solution too for my "rased" module which display who is online sorting by their countries:

Click to see original Image in a new window

Live demo: http://www.islamic-call.net/english/






Posted on: 2008/12/3 11:44
Transfer the post to other applications Transfer


Re: Membership: MaxMind GeoIP instead of ip-to-country
Moderator
Joined:
2008/4/7 0:30
From Portugal
Group:
Webmasters
Registered Users
Posts: 303
Offline
Thanks McDonald, I have take a look and it seems interesting.
For what I can see the CSV file is more complete(and often updated) that the one that comes with the module. The user has allways to upload the database (.dat) and/or CSV no? I originally thought that the API was to get the data from their server :(
In case the user has to upload a BIG file then I think it makes sense to use the script to move it to database. Database is more faster then file system.

Maybe we could make a module just for this online block or with several online blocks. It does not have to be attached to membership.

Mowaffak, you could send me your module so I could take a look?
Thanks!

Posted on: 2008/12/3 19:07
_________________
TDM
Transfer the post to other applications Transfer


Re: Membership: MaxMind GeoIP instead of ip-to-country
Just popping in
Joined:
2008/11/29 1:33
Group:
Registered Users
Posts: 3
Offline
The 2 files GeoIP PHP API and GeoLite Country binary are needed on the server.
The binary (1.1MB) is smaller than ip-to-country (4.2MB), more complete and better maintained.
I have an old counter, PHP-I-Stats that uses this.
#########################################################################
/* update country counter */
#########################################################################

// read GeoIP database
$handle geoip_open(LIBPATH "GeoIP.dat"GEOIP_STANDARD);

$country_code geoip_country_code_by_addr($handle$_SERVER['REMOTE_ADDR']);
$country_name geoip_country_name_by_addr($handle$_SERVER['REMOTE_ADDR']);
$db->query("UPDATE is_country SET mthcount=mthcount+'1', daycount=daycount+'1', count=count+'1' WHERE country_code='".$country_code."'");
geoip_close($handle);

The user has only to upload the binary when a new update is available, which saves saves time because it's smaller and does not have to go into database.

There's also GeoLite City for recognising the city of the visitor, but this seems to be appr. 25MB when decompressed. Little bit big, but can be optional.

Posted on: 2008/12/3 21:25
Transfer the post to other applications Transfer


Re: Membership: MaxMind GeoIP instead of ip-to-country
Moderator
Joined:
2008/6/2 19:00
Group:
Webmasters
Registered Users
Posts: 48
Offline
Find attached file

Attach file:


zip rased.zip Size: 159.35 KB; Hits: 397

Posted on: 2008/12/4 15:40
Transfer the post to other applications Transfer


Re: Membership: MaxMind GeoIP instead of ip-to-country
Just popping in
Joined:
2015/3/4 7:08
Group:
Registered Users
Posts: 1
Offline
Also, I remember that SMD or Comflash had the idea to convert Memberstats into a webcounter module. Is this maybe an idea?



NAT

Posted on: 2015/3/4 7:10
Transfer the post to other applications Transfer






You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.

[Advanced Search]


 

Login

Username:

Password:

Remember me



Lost Password?

Register now!

Ajax Search


Advanced Search

Newest Posts