How to determine "Geo Location"?
How to get country information from IP address
IP to Country calculation
Mar 28th, 2008 17:17
ha mo, Arijit Sarbagna, http://www.innindia.com/services/?type=5
In order to get the country (or even city) specific information from
the IP address, one needs to get hold of a IP database. As you are
probably aware, every ISP has a set of IP pool, which they are
allocated to distribute to their end users (e.g. you & me). Now, once
you get this DB (some are free...but has limited information, whereas
some are paid, very comprehensive & provider takes care of regular
updates). Once this DB is with you, rest is just plugging in a script
to query this DB & get all the relevany information.
How exactly it works?
IP address is usually expressed as four decimal numbers, each
representing eight bits (separated by periods). This is also known as
the dot address and more technically as "dotted quad notation". The DB
that is available, generally maps a decimal notation of any IP address
to corresponding Country/City info.
See a live system: http://www.innindia.com/services/?type=5