Skip to content

RobWC/node-geoip-to-mongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Query:
db.iptocn.find({numberStart: {$lte: IPNUMTOCHECK}}).sort({numberStart: -1}).limit(1)

To convert to number:
var spIP = 'IPADDR'.split('.')
num = (16777216 *  spIP[0]) + (65536*spIP[1]) + (256* spIP[2]) +(spIP[3])

About

Tool to insert the GeoIP DB into MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published