Solved

desktop user/visitor location accuracy?

Posted on 2012-04-03
5
268 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 108

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

Easy Project Management (No User Manual Required)

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now