nigma wrote:I was just using that as an example to help better illustrate my question: how can you correlate a zip code and an ip address?
You can't. You can however get surprisingly close, most of the time.
Here's how it works.. Imagine the world was split into two bits - 0 or 1. Everything to the left of the prime meridian is 0, and to the right is 1.
Splitting that further, we'll make a second bit. If its above the equator, its 1, and below is 0.
Using this example, the United States of America mostly fits in 0.0.
Imagine 20+ years of political arguing, playing favorites, and swapping of bit-locations, and you have an idea of how the different IP ranges actually dictate location.
While it may have started out that 1.1.1.1 was in Washington, D.C., USA, over time, it was moved, traded, reassigned, and now sits in New Mexico. (Thats actually not true, its just an example #).
So, if you could somehow get a list of the "directions" so to speak for the different locations (ie, 0.0 = above equator, left of Prime Meridian), then you could get *close* to the correct location. (As long as it hasnt been moved/reassigned since then)
Of course, it has, so to get around that, you can get the netblock information for the ip address, and find out where IT'S location is - which is usually more up to date. (Again, as long as that netblock hasn't done vlan's, or moved in the meantime).
Of course, THAT has too, which is why I say, its just a guess.
But its a pretty good guess, based on data that changes VERY quickly.