Any way to verify user's geolocation?
Newbie question.
I'm trying to make a mobile site using html5's geolocation (I know technically it's a separate spec, but still) to identify user's current position and post that to a web service which then does something. Basically a browser version of Four Square.
Is there anyway that I can verify that the user is really at that location? I want to prevent someone from making something, say a console app, that sends fake lat/long to the service.
Any suggestion is welc开发者_StackOverflowome, even if it doesn't get me there 100%. Thanks, SO community!
The short answer is no. All you can know for sure is where the browser claims to be. A sufficiently determined user could fake this.
A feature like this is really best used for convenience, not for security.
Ask the user to take a photo of the area, and compare that with Google Street View images near their stated location.
Or no. You might be able to get location information from DNS LOC (RFC1876), which might be accurate to within a few tens of kilometres, and only then if the DNS information is also accurate.
Yes - I know there is because GoWalla (available for free at the iPhone app store) requires a user to be at a given location before checking-in.
Unfortunately I'm not familiar with how they did this.
精彩评论