|
Posted by esoterik on 09/10/07 15:38
On Mon, 10 Sep 2007 11:30:27 -0400, Jerry Stuckle wrote:
> esoterik wrote:
>> On Mon, 10 Sep 2007 07:52:36 -0400, Jerry Stuckle wrote:
>>
>>> esoterik wrote:
>>>> On Sun, 09 Sep 2007 17:19:23 -0400, Jerry Stuckle wrote:
>>>>
>>>>> esoterik wrote:
>>>>>> On Sat, 08 Sep 2007 14:32:18 +0000, Rob wrote:
>>>>>>
>>>>>>> Just wondering how sites capture a visitor's IP address and how this is
>>>>>>> done in PHP?
>>>>>> any ideas how the ip address is resolved to a zipcode/location without
>>>>>> using one of the commercial lists?
>>>>>>
>>>>> Nope, and even then it is not accurate. For instance, all AOL users
>>>>> show as coming from Virginia. And when I'm on my dialup account from
>>>>> MD, it shows I'm coming from NY.
>>>>>
>>>>> You can get a state (or, as in the case of the Washington, DC area, a
>>>>> metro area) in maybe 70-90% of the cases. But the more accurate you try
>>>>> to narrow it down, the less accurate your location will be.
>>>>>
>>>>>
>>>> how exactly would you narrow it down to even the metro area of where the
>>>> IP is registered to? I know visual traceroutes exist, but I'm not sure how
>>>> I could write a script to resolve IP to an 'area' short of using cURL to
>>>> strip it off someone elses website.
>>>>
>>> Tracing the route does nothing. You need an ip address to location
>>> reference. The most accurate (still not very accurate) are available
>>> for a charge; the free ones I've found are not very accurate.
>>>
>>> Why do you need this, anyway?
>>>
>>
>> Just hoping to create a crude map of users to map across the US. I was
>> hoping there was some way to resolve a WHOIS type database for IP
>> addresses etc. Im not worried about exact locations, just mapping general
>> regions for people.
>>
>
> Not easily, I'm afraid.
>
> As I said - the IP addresses are notoriously inaccurate. All AOL users
> seem to come from Virginia because that's where AOL's internet servers
> are. My dialup comes from NY, even though I'm in MD, because that's
> where their servers are.
>
> My cable link is at least in the same county, but that's not necessarily
> true, even here in the DC area.
>
> Additionally, corporations with several locations might route all of
> their internet traffic through a single server (or multiple servers at
> one location), accessed by their intranet. So everyone in the company
> would look like they're all coming from the same location.
>
> The commercial services try to tell you their data is accurate - and it
> is, as far as it can be. But in the end the accuracy is limited by the
> companies and ISPs, where they put their servers, and how they route
> their traffic.
>
very true. I'm going to just use cURL to pull results from
http://whatismyipaddress.com/staticpages/index.php/lookup-ip which seem to
be pretty accurate for my ip's (within 5 miles in canada) and give it some
time to see how accurate it can be. thanks for the info jerry.
Navigation:
[Reply to this message]
|