如何找出 HTTP 请求的来源?
我可以通过哪些方式找到生成 HTTP 请求的来源?我只知道一个,即 HTTP Referrer 字段。还有其他办法吗?
编辑:在这里我只想知道请求是直接从机器生成还是从其他网站生成。如果是其他网站,那么是哪一个?我对 IP 级别的细节不感兴趣。
What are the various ways through which I can find out the source from which a HTTP request is generated? I know only one, i.e. HTTP referrer field. Is there any other way also?
EDIT: Here I am only interested in knowing that whether the request is generated from a machine directly or from some other website. And in case of some other website, then which one? I am not interested in IP level details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
正确答案是“不。 – SLAks 10 月 31 日 17:34”
Correct answer is "Nope. – SLaks♦ Oct 31 at 17:34"
您可以对远程 IP 进行地理查找...
You coud do a geo lookup of the remote ip...
从发出请求的位置获取源的最简单方法是解析请求标头。以下是有关如何检索所请求的客户详细信息的示例。
var agent = Request.Headers.UserAgent;
The simplest method to get the source from where the request has been made is parsing of request headers. Below is the example on how to retrieve the requested client details.
var agent = Request.Headers.UserAgent;