faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 8 people (75%) answered Yes
Recently 6 of 8 people (75%) answered Yes

Entry

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
Regards
WC
http://www.innindia.com
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com