代码:
<!DOCTYPE html><html>
<body>
<p>
<b>You are browsing this site with:</b>
<%Response.Write(Request.ServerVariables("http_user_agent"))%>
</p>
<p>
<b>Your IP address is:</b>
<%Response.Write(Request.ServerVariables("remote_addr"))%>
</p>
<p>
<b>The DNS lookup of the IP address is:</b>
<%Response.Write(Request.ServerVariables("remote_host"))%>
</p>
<p>
<b>The method used to call the page:</b>
<%Response.Write(Request.ServerVariables("request_method"))%>
</p>
<p>
<b>The server's domain name:</b>
<%Response.Write(Request.ServerVariables("server_name"))%>
</p>
<p>
<b>The server's port:</b>
<%Response.Write(Request.ServerVariables("server_port"))%>
</p>
<p>
<b>The server's software:</b>
<%Response.Write(Request.ServerVariables("server_software"))%>
</p>
</body>
</html>
结果:
You are browsing this site with:
Your IP address is: 42.120.45.233
The DNS lookup of the IP address is: 42.120.45.233
The method used to call the page: GET
The server's domain name: w3cschool.cc
The server's port: 80
The server's software: Microsoft-IIS/7.5
- ASP 变量
- ASP Application 对象
- ASP 引用文件
- ASP ADO
- ASP AdRotator
- AJAX 数据库
- ASP WriteBlankLines 方法
- ASP Drive 属性
- ASP ParentFolder 属性
- ASP AppendToLog 方法
- ASP Flush 方法
- ASP SessionID 属性
- ASP GetLastError 方法
- ASP MapPath 方法
- ASP DriveExists 方法
- ASP MoveFile 方法
- ASP OpenTextFile 方法
- ASP.NET HtmlInputText 控件
- ASP.NET HtmlTableCell 控件
- POST表单