Re: IP to City detection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is very hard to get to the level of city. It is the way the networks are built. I live in a minor town. My provider has a node in this city, but it gathers all the traffic of the whole area (my town and neighboring towns) and sends it through an internal link to their major regional center. Depending on availability, my traffic might get to the Internet (uppercase Internet, the big, public, global one which links us all together) right through that regional node or, depending on traffic, it might get beamed over somewhere else and get into the Internet at another less busy node. Big providers are constantly shufling traffic around depending on the availabilty of their own internal network and that of their wholesale provider. The IP you see exposed to the Internet is that of the node where your provider internal network connects to the public network, the uppercase Internet. Due to national regulations, it is usually hard for one national provider to use IP addresses belonging to another country so, IP to country tables are quite reliable. IP to city is not reliable at all, there is not external rules imposing arbitrary borders on traffic so a provider is free to send packets wherever it becomes more efficient. Moreover, if a client has the same provider as your service, the IP address you receive might be an internal IP address and not an actual Interner address. Internal IP addresses have little restrictions, they can be almost anything. If that were the case, all bets are off.

These days with the CeBit show running at Frankfurt, Deutsch Telekom (sorry about the spelling) might be struggling with their bandwith around that area. Data packets might be popping about everywhere in Germany and, if they have agreements with neighboring countries, some might be showing up at Denmark, Austria or Poland, who knows! My town is close to Barcelona, Spain. When they had the 3G mobile phone conference there last month, my packets might be going to Tarragona, Valencia or even all the way to Madrid.

Comercial IP to location databases, at least, keep in close contact with the major providers so they have a close idea of how are they routing their packets. Non-comercial databases don't have the resoorces to keep updated. The only reason they are more or less reliable at the IP to country level is that governments have different regulations in each country and they know there is value in the information flowing through the optical fibers so, while they figure out how to tax those bits and bytes, they make it just a little more hard for them to flow from one country to the next, but within a single country, there are no limits.

Satyam



----- Original Message ----- From: "William Lovaton" <williama_lovaton@xxxxxxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Wednesday, March 21, 2007 1:24 PM
Subject:  IP to City detection


Hi people,

Is there a way to detect the city of a person based on the IP address? I
mean something like ip2nation http://www.ip2nation.com/ but for cities
so I can use it in my PHP web application.

Thanks for any help you can give me,

-William

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.15/728 - Release Date: 20/03/2007 8:07



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux