Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.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: UNSURE 0.388 X-Spam-Level: *** X-Spam-Evidence: '*H*': 0.35; '*S*': 0.13; 'apis': 0.09; "they've": 0.09; 'dynamic,': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'subject: ?': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'question': 0.24; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'database,': 0.30; 'locations': 0.30; 'addresses': 0.33; 'google': 0.35; 'building': 0.35; 'there': 0.35; 'really': 0.36; 'should': 0.36; 'so,': 0.37; 'sometimes': 0.38; 'message-id:@gmail.com': 0.38; 'to:addr:python- list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'users': 0.40; 'even': 0.60; 'new': 0.61; 'browser': 0.61; 'you.': 0.62; 'map': 0.64; 'city': 0.66; '8bit%:100': 0.72; 'url:info': 0.73; '10:32': 0.84; 'geo': 0.84; 'guessed': 0.84; 'reliability': 0.84; 'sometimes.': 0.84; 'thing,': 0.91; 'hand,': 0.93; 'period.': 0.95 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Fri, 12 Jul 2013 16:15:27 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130105 Thunderbird/10.0.12 MIME-Version: 1.0 To: python-list@python.org Subject: Re: GeoIP2 for retrieving city and region ? References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 15 Jul 2013 15:00:27 +0200 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1373893228 news.xs4all.nl 15948 [2001:888:2000:d::a6]:50804 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:50683 On 07/12/2013 10:32 AM, Νικόλας wrote: > So, my question now is, if there is some way we can get an accurate Geo > City database. As has been said pretty much by every other poster, there is no way to do get an accurate location database. Period. The databases that do exist were built by hand, and also guessed at based on routing information. The best you can really do is region, or country, and even that fails sometimes. If you want to know a visitor's city you should ask them using the new browser location apis available to javascript. http://diveintohtml5.info/geolocation.html Since IPs can be dynamic, sometimes even assigned across a region, there's no way to accurately map ip addresses to a city with the reliability that you seem to want. Google is pretty accurate because they've spent a lot of time building up their own database, and also convincing users to reveal their locations to them. Unless you do the same thing, you have to just get by with what others have provided for you.