如何获取 KRL 规则中的用户位置?
如何获取 KRL 规则中的用户位置?
- 方法是什么?
- 使用该方法的优点或缺点是什么?
How can I get a users location in a KRL rule?
- What is the method?
- What is the advantage or disadvantage of using that method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个简单的示例
,这是文档。 http://docs.kynetx.com/docs/Location
您会发现的问题是,有时IP 并不真正代表用户的真实位置,因为用户可能正在使用代理。此外,大多数 ISP 的 IP 都注册到某个位置,而 ISP 的集线器并不是在任何给定时刻使用 IP 的直接位置。
随着浏览器中 html 5 和位置 API 的出现,将来可能可以获得更准确的位置,但目前 KRL 尚未实现。
Here is a simple example
And here is the docs. http://docs.kynetx.com/docs/Location
The issue you will find is that sometimes the ip does not really represent the real location of the user because the user could be using a proxy. Also with most ISP's the ip is registered to a location a the and ISP's hub not the direct location of where the IP is being used at any given moment.
With the advent of html 5 and location apis in the browser it may be posable in the future to get a more exact location but that has not been implemented in KRL as of yet.
HTM5 浏览器位置现已可用,但需要一些 JavaScript 才能实现。这是一个稍微旧的应用程序,使用浏览器位置 API。这可能会更新为不使用表单,但这里仅供参考:
HTM5 Browser location is available now, but requires some javascript to make it happen. This is a slightly old app that uses the Browser Location APIs. This could probably be updated to not use a form, but here it is for reference: