Solved

desktop user/visitor location accuracy?

Posted on 2012-04-03
5
280 Views
Last Modified: 2012-04-04
Hi

Is it possible to get the location of a visitor to your website with a good degree of accuracy?

I would like to develop a poll which only allows people from a set area to vote.... I know this will be easy enough to get around (you could live 100 miles away and drive to the restricted area then you would be able to vote on your smartphone, laptop, cybercafe etc) but I think it would be good enough for the purpose I have.

Is it possible to get a users location when they are on a desktop/laptop computer?

Cheers

CD
0
Comment
Question by:cycledude
  • 3
5 Comments
 

Author Comment

by:cycledude
ID: 37799889
I just tested the 'my location' on google maps, and it funked out by c. 15 miles.... is this as good as it gets for desktop/laptop computers?

is geolocation only good for mobile devices?
0
 
LVL 29

Assisted Solution

by:Olaf Doschke
Olaf Doschke earned 100 total points
ID: 37799933
yes, your PC has no gps device in it, has it? Geolocation via IP adress is unprecise by nature, an IP adress has even less a hint on a location as a phone number via it's area codes. Only static IP adresses can be located via their registered whois information, for example. But roaming IPs used by ISPs can be for your pc now and could be used for any other pc in the world tomorrow.

Also see http://en.wikipedia.org/wiki/Geolocation
Geolocation usually works by automatically looking up an IP address on a WHOIS service and retrieving the registrant's physical address.[1]
IP address geolocation data can include information such as country, region, city, postal/zip code.[2], latitude, longitude and timezone.[3]

Bye, Olaf.
0
 

Author Comment

by:cycledude
ID: 37800100
thanks olaf
0
 
LVL 109

Accepted Solution

by:
Ray Paseur earned 400 total points
ID: 37800764
Have a look at this page.  
http://www.landonbaseball.com/site_visitors.php

The map is drawn from the geolocation (via GEOIO.com) of the client IP address.  I have thousands of visitors to this site, but only map out 327 distinct locations.  This happens because of three factors.  

First, the geolocation from GEOIO.com is the location of the internet point-of-presence for that IP address.  This is probably a data center or switch location.  In other words, my next door neighbor probably has the same POP location that I have.

Second, I only keep the first four decimal digits of the geocode lat/lon pair.  If you keep 4 decimal places, you are ICBM close.  If you keep 6 digits you have very good accuracy, and at 7 digits, you are usually on the rooftop.

Third, in my query to set the mapping points I only SELECT the geocodes that lie within close geographical proximity to the school, since I am only drawing a small map.

So to the question of "good..."  Good is a relative term, a value judgement.  Is the POP location better than a ZIP code?  I don't know - that's for you to figure out in your application design.  It may or may not be useful.  You might want to look into HTML5 geolocation data.  I do not know whether this is going to be more accurate than geocoding for the IP address, but it would be the more current technology choice.
0
 

Author Closing Comment

by:cycledude
ID: 37805693
Thanks for the heads up ray, that site looks like it could be useful to me.  I got my location wrong from my ip address, but at least it was close.... ish!

It will be better than no location information at all.

Cheers

CD
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question