Path: csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.180 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.66; '*S*': 0.02; 'melbourne': 0.05; 'say,': 0.05; '"my': 0.09; 'measure': 0.09; 'separating': 0.09; 'wrong,': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'other),': 0.16; 'quoted': 0.16; 'tighter': 0.16; 'vastly': 0.16; 'sat,': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'proxy': 0.24; "haven't": 0.24; 'sort': 0.25; "i've": 0.25; 'least': 0.26; 'certain': 0.27; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'tried': 0.27; 'testing': 0.29; 'chris': 0.29; 'am,': 0.29; 'blackberry': 0.30; 'message-id:@mail.gmail.com': 0.30; '13,': 0.31; "i'd": 0.34; 'could': 0.34; "can't": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'european': 0.36; 'doing': 0.36; 'shows': 0.36; 'wrong': 0.37; 'too': 0.37; 'list': 0.37; 'to:addr:python-list': 0.38; 'rather': 0.38; 'anything': 0.39; 'recent': 0.39; 'expect': 0.39; 'aside': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'improved': 0.60; 'most': 0.60; 'ago,': 0.61; "you're": 0.61; 'back': 0.62; 'real': 0.63; 'confirm': 0.64; 'distance': 0.65; 'within': 0.65; 'technology,': 0.70; 'jul': 0.74; 'address,': 0.75; '100%': 0.77; 'country': 0.77; 'dsl': 0.84; 'gps': 0.84; 'latitude': 0.84; 'visitor': 0.84; 'absolutely': 0.87; 'afford': 0.91; 'hate': 0.91; 'north,': 0.91; 'states,': 0.91; 'whereas': 0.91; 'ultimate': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=NjR2KshBJvWyXtsY9HheM1TmHsgQ2KwQt4tfDkV9/sw=; b=TiA+m9Zis5KzQyuyuLCJXcNZygwVpAWSKJaNIPj6dcEoPkdykfoYRoudVqhp3dCxcl RAfpPTUmokDMT7b6P74p7ifaK3vXd1ET0pecYz/WVcertacRGeKJcEHLueqSGojcTDse 1n7fK9xdek8nN7KgugHUgwEo++Q4/JlGCvSLZ0bmpQJyjJ/ozBb7c0JXB+xxJXZ1wjRc bUOCPvDn5UBsysKRf7PvS2n288B4KsBG6pV/iSu+xyhrOwXRYXHZlnjaiFcczUHZb76v D2WvuXFOaR5TeioRezYoptwsgHtnIyyDtlJkIAUdoAntv0JYLQK4BpYhYfBF4Cr73TOs ajvw== MIME-Version: 1.0 X-Received: by 10.220.169.146 with SMTP id z18mr25826987vcy.80.1373675788101; Fri, 12 Jul 2013 17:36:28 -0700 (PDT) In-Reply-To: <7v11u8p3hrs2jvj9jqmvct8k1cl0fjc9ct@4ax.com> References: <7v11u8p3hrs2jvj9jqmvct8k1cl0fjc9ct@4ax.com> Date: Sat, 13 Jul 2013 10:36:28 +1000 Subject: Re: GeoIP2 for retrieving city and region ? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 46 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373675790 news.xs4all.nl 15883 [2001:888:2000:d::a6]:33484 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50566 On Sat, Jul 13, 2013 at 9:04 AM, Dennis Lee Bieber wrote: > On Sat, 13 Jul 2013 02:47:38 +1000, Chris Angelico > declaimed the following: > >> >>Oh, and just for laughs, I tried a few of my recent mobile IP >>addresses in the GeoIP lookup. All of them quoted Melbourne someplace, >>some in the CBD and some out in the suburbs, but all vastly wrong, and >>places I haven't been. But I'd never expect it to be accurate on >>those. >> > Well... the MaxMind demo of "my IP" did get the proper metropolitan > area... But they list the ISP as "AT&T"... My real ISP is Earthlink > (piggybacking on AT&T DSL service). > > The Lat/Long, however shows as > > 42.9634 -85.6681 > whereas a recent GPS readout shows > 42.9159 -85.5541 > > or 2m50s too far north, and 6m50s too far west. > > Same website, accessed from my Blackberry phone, gave a result of > "United States, NA" and location 38 -97 When you try to place a visitor geographically by IP address, the only thing you can be absolutely 100% certain of is which RIR they're at (proxies aside - you're just testing the proxy rather than the ultimate origin). Country is also highly likely to be right, though not certain (I've never known it to be wrong, but I've never been able to confirm what happens with some of the small European countries - for all I know they could share ISPs and netblocks). Anything tighter than that is goign to be pretty hit-and-miss. But I have to say, it's improved a lot over the years. Back in the early 2000s - say, about 8 years ago, I think - I was playing with this sort of technology, and it placed me in Sydney. That's one state away, lots of rivalry separating us (friendly rivalry, of course; in a country that's doing its best to kill us all, we can't afford to really hate each other), and roughly 750-1000km wrong by distance (depending on how you measure - most people don't put an odometer on a crow). So at least now it gets within the same degree of latitude and longitude... most of the time. ChrisA