public
Description: ruby binding to maxmind geoip library
Homepage: http://geoip-city.rubyforge.org
Clone URL: git://github.com/ry/geoip-city.git
updates to readme
Ryan Dahl (author)
Tue Mar 04 14:58:58 -0800 2008
commit  94e8ce6f3da3a23f2a9e35102e7e797276b7e54c
tree    a82ecb8e6ca772b7117dfc247662648268225eca
parent  ea200d82a199528effb8c6d9575dd71b28d59d30
0
...
22
23
24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
26
27
...
44
45
46
47
48
49
50
...
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
...
59
60
61
 
62
63
64
0
@@ -22,6 +22,21 @@ mapping information. It is kindly provided free of charge by MaxMind.com.
0
    # :area_code=>607,
0
    # :region=>"NY" }
0
 
0
+There are two optional arguments to database initializer.
0
+The first argument is the filename of the GeoIPCity.dat file
0
+The second argument (optional) is to specify how GeoIP should
0
+keep the database in memory. There are three possibilities
0
+* :filesystem -- read database from filesystem, uses least memory.
0
+* :index -- the most frequently accessed index portion of the database, resulting in faster lookups than :filesystem, but less memory usage than :memory.
0
+* :memory -- load database into memory, faster performance but uses more memory.
0
+ (default)
0
+
0
+The third argument is boolean and decides whether the system should reload the database if changes are made to the dat file. (You probably don't need this. Default: false.)
0
+
0
+For example
0
+
0
+ GeoIPCity::Database.new(dbfile, :filesystem, true)
0
+
0
 = Install
0
 Some variation of the following should work.
0
 
0
@@ -44,7 +59,6 @@ Some variation of the following should work.
0
    I put this file in
0
    /opt/GeoIP/share/GeoIP/GeoLiteCity.dat
0
 
0
-
0
 4. Use it!
0
 
0
 = License

Comments

    No one has commented yet.