mochi / egeoip Goto Github PK
View Code? Open in Web Editor NEWErlang IP Geolocation module, currently supporting the MaxMind GeoLite City Database.
License: Other
Erlang IP Geolocation module, currently supporting the MaxMind GeoLite City Database.
License: Other
Region code is sometime returned as an integer?
egeoip:lookup("247.253.22.96").
{ok,{geoip,"CG","COG","Congo", <<16>>, <<>>,<<>>,-27.0,133.0,0,0}}
From http://www.maxmind.com/app/city, region should be char(2)...
State/Region
char(2)
For US/Canada, ISO-3166-2 code for the state/province name, with the addition of AA, AE, and AP for Armed Forces America, Europe and Pacific. Outside of the US and Canada, FIPS 10-4 code. Region name lookups are available in selected APIs
14:06:42.593 [error] CRASH REPORT Process <0.117.0> with 0 neighbours exited with reason: no function clause matching egeoip:read_segments(1, <<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,...>>, 827301) line 486 in gen_server:init_it/6 line 330
14:06:42.594 [error] Supervisor egeoip_sup had child egeoip_0 started with egeoip:start_link(egeoip_0, ["/usr/share/GeoIP/GeoIP.dat"]) at undefined exit with reason no function clause matching egeoip:read_segments(1, <<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,...>>, 827301) line 486 in context start_error
14:06:42.595 [error] CRASH REPORT Process <0.114.0> with 0 neighbours exited with reason: {{shutdown,{failed_to_start_child,egeoip_0,{function_clause,[{egeoip,read_segments,[1,<<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,255,171,0,0,10,1,0,211,1,0,10,0,0,225,255,255,235,1,0,141,2,0,12,0,0,15,0,0,13,0,0,14,0,0,49,9,0,153,9,0,0,255,255,225,255,255,16,0,0,17,0,0,162,9,0,90,10,0,123,10,0,218,10,0,19,0,0,25,0,0,20,0,0,22,0,0,21,0,0,225,255,255,225,255,255,153,11,0,23,0,0,24,0,0,81,12,0,225,255,255,225,255,255,242,12,0,26,0,0,29,0,...>>,...],...},...]}}},...} in application_master:init/4 line 133
14:06:42.595 [info] Application egeoip exited with reason: {{shutdown,{failed_to_start_child,egeoip_0,{function_clause,[{egeoip,read_segments,[1,<<1,0,0,123,0,0,2,0,0,62,0,0,3,0,0,31,0,0,4,0,0,18,0,0,5,0,0,11,0,0,6,0,0,9,0,0,7,0,0,8,0,0,0,255,255,171,0,0,10,1,0,211,1,0,10,0,0,225,255,255,235,1,0,141,2,0,12,0,0,15,0,0,13,0,0,14,0,0,49,9,0,153,9,0,0,255,255,225,255,255,16,0,0,17,0,0,162,9,0,90,10,0,123,10,0,218,10,0,19,0,0,25,0,0,20,0,0,22,0,0,21,0,0,225,255,255,225,255,255,153,11,0,23,0,0,24,0,0,81,12,0,225,255,255,225,255,255,242,12,0,26,0,0,29,0,...>>,...],...},...]}}},...}
Version
Name : GeoIP
Arch : x86_64
Version : 1.4.8
Release : 1.5.amzn1
Size : 1.5 M
Repo : installed
From repo : amzn-main
Summary : C library for country/city/organization to IP address or hostname mapping
URL : http://www.maxmind.com/app/c
License : LGPLv2+
Description : GeoIP is a C library that enables the user to find the country that any IP
: address or hostname originates from. It uses a file based database that is
: accurate as of March 2003. This database simply contains IP blocks as keys, and
: countries as values. This database should be more complete and accurate than
: using reverse DNS lookups.
Hi,
Can any one help me out to How to merge MaxMinds "GeoIPOrg", "GeoIPISP" and "GeoIPCity" into egeoip.
I am planning to get the "GeoIPCity" along with "GeoIPOrg" and "GeoIPISP".
Thanks
I am trying to lookup for 103.75.56.234 but I got an empty result as follows:
(websocket_example@ubuntu)10> egeoip:lookup("103.75.56.234").
{ok,{geoip,[],[],[],<<>>,<<>>,<<>>,0.0,0.0,0,0}}
I just started using egeoip and the reserved memory of the erlang VM went up from ~60MB to ~270MB
on 64 bit erlang 17.3
Not that it's a huge problem, just asking if it's normal.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.