Skip to content

Commit

Permalink
add new content in README
Browse files Browse the repository at this point in the history
  • Loading branch information
kuno committed Dec 9, 2010
1 parent 1faefbf commit 7cc6a5c
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 6 deletions.
66 changes: 62 additions & 4 deletions README.md
Expand Up @@ -4,6 +4,25 @@

Get geolocation information based on domain or IP address.

###Changelog
####v0.1.0, 2010-11-25

1, Initial release;

####v0.1.1, 2010-11-27:

1, Removed GeoIP.dat, due to licence(or money) problem.

2, renamed city property to City, renamed country property to Country.

3, Allow close method to set all properties of an exsiting obj to undefined.

####v0.1.2, 2010-12-02

1, Fixed missing of isIP method in node 0.2.x series.

2, Hidden some unsafe an useless funcions.

###Data

Befor you can use this package, you need to download or buy some data from [www.maxmind.com](http://www.maxmind.com/app/ip-location).
Expand All @@ -26,7 +45,7 @@ GeoIP City Lite Edition [Download](http://geolite.maxmind.com/download/geoip/dat

* Open the country data file

var data = geoip.open('/path/to/GeoIP.dat');
var country_data = geoip.open('/path/to/GeoIP.dat');

* Synchronous methods, network independence.

Expand All @@ -46,13 +65,13 @@ GeoIP City Lite Edition [Download](http://geolite.maxmind.com/download/geoip/dat
console.log(name); // prints 'United States'
});
* Set all properties of an existing data object to undefined.
geoip.close(data);
geoip.close(country_data);

####City Information

* Open the GeoLiteCity.dat file first.

var data = geoip.open('/path/to/GeoLiteCity.dat');
var city_data = geoip.open('/path/to/GeoLiteCity.dat');

geoip.City.record_by_addr(data, '8.8.8.8'); // You will get something like this:

Expand All @@ -69,4 +88,43 @@ GeoIP City Lite Edition [Download](http://geolite.maxmind.com/download/geoip/dat
//dma_code: 807,
//metro_code: 807,
//area_code: 650
//}
//}

geoip.close(city_data);

####Organization Information

* Open the GeoIPOrg.dat first.
var org_data = geoip.open('/path/to/GeoIPOrg.dat');

geoip.Org.org_by_addr(data, '8.8.8.8');
// You wikk get something like below:
// 'GenuityThe United WayEducation Management CorporationInternational Generating Co.
// (Intergen)GoldK.com LLCCisco Systems,
// Inc.Verizon/SixContinents HotelsDrug Enforcement AdmFloors IncUS Dept of Treasury - TIGTAHTS Engineering,
// LTDITS Caleb BrettAutomated Power Exchange,
// Inc.Neuberger Ber'

geoip.close(org_data);


####Region Information

* Open the GeoIPRegion.dat first.
var region_data = geoip.open('/path/to/GeoIPRegion.dat');

geoip.Region.region_by_addr(region_data, '8.8.8.8'); // prints 'US,CO'

geoip.close(region_data);


####NetSpeed Information

* Open the GeoIPNetSpeed.dat first
var netspeed_data = geoip.open('/path/go/GeoIPNetSpeed.dat');

geoip.NetSpeed.speed_by_addr(netspeed_data, '8.8.8.8'); // prints 'Dailup'

geoip.close(netspeed_data);


6 changes: 4 additions & 2 deletions TODO.md
Expand Up @@ -2,7 +2,7 @@
li {
}
em {
text-decoration: line-through;
text-decoration: line-through;
}
strong {
color: #ff80b2;
Expand All @@ -17,5 +17,7 @@ color: #ff80b2;
###v0.2.0###
* re-factory the whole direcoty
* add more module other then country and City
* make all methods asynchronous
* add db_type check in every module

###v0.3.0###
* make all methods asynchronous

0 comments on commit 7cc6a5c

Please sign in to comment.