animateyourart,
First, let's start with what you are actually trying to accomplish. What you describe is very vague. There are numerous possibilities. Can you be more specific. Are you talking about users browsing to your site(s)? Do you want to redirect them to regional sites? Or areyou talking about geographically dispersed nodes on an enterprise network? The method will differ based on what your real objectives are.
From consumer.net:
How Can Users be Traced from their IP Addresses?
Once an IP address is captured several methods can be used to trace the user. These tools can be found at
[ul][li]Determine who owns the network. IP addresses are distributed in blocks to network providers or private companies. By searching IP registration databases it is possible to determine who owns an IP address block. Databases are available on the Internet for the Americas, Europe, and Asia-Pacific regions. Sophisticated computer break-ins sometimes include an attempt to erase the IP addresses captured by the log files to prevent this type of lookup. [/li]
[li]Perform a "reverse lookup." This converts the IP address into a computer name [Example: convert 206.156.18.122 into www.consumer.net]. This is used to determine if a computer is part of a registered Internet domain. [/li]
[li]Conduct a Traceroute. When information packets travel through the Internet they pass through several computers in a hierarchical fashion. Normally packets pass from the user to their Internet Service Provider (ISP) until it reaches the user's "backbone" provider. It then transfers to the destination "backbone " provider down to the ISP of the destination computer and finally to the intended recipient. It is often possible to determine an approximate physical location of an IP address in this fashion. It is also possible to determine the computer's ISP and/or network provider even if the computer itself is not part of a domain. This is usually how junk e-mail or "spam" is traced. [/li]
[li]Review domain registration information via the "WHOIS" databases. Domain registration information is available via the Internet by performing a WHOIS on the domain name portion of the computer name [Example: for
perform WHOIS CONSUMER.NET to obtain the registration information]. [/li]
[li]Search the Internet for the IP address and/or computer name. It is often possible to find matches from users making public postings on discussion boards or from web sites that leave their log files open to the Internet. Of course, web site owners and/or banner networks could have additional non-public information based on activities at their web sites. [/li][/ul]
If you are talking about an enterprise network, you can exercise a greater level of control over the situation and embed information in environment variables, look at assigned servers and generally be creative with IP addressing. But somehow I suspect that is not where you are headed with this. Post back with some specifics.
The Old Man