English 中文(简体)
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 welcome, 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.





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签