手机
当前位置:查字典教程网 >编程开发 >编程10000问 >如何侦测HTTP表头信息?
如何侦测HTTP表头信息?
摘要:千花飞舞之HTTPheadERS侦测变量值

<html>

<head>

<title> 千花飞舞之HTTP headERS侦测< /title>

</head>

<body>

<TABLE BORDER=1>

<tr><td VALIGN=TOP><B>变量</B></td>

<td VALIGN=TOP><B>值</B></td></tr>

<% For Each key In Request.ServerVariables %>

<tr>

<td><% = key %></td>

<td>

<%

If Request.ServerVariables(key) = "" Then

If GetAttribute(key) = "" Then

Response.Write " "

Else

Response.Write GetAttribute(key)

End If

Else

Response.Write Request.ServerVariables(key)

End If

Response.Write "</td>"

%>

</tr>

<% Next %>

</TABLE>

</body></html>

<%

Function GetAttribute(AttrName)

Dim AllAttrs

Dim RealAttrName

Dim Location

Dim Result

AllAttrs = Request.ServerVariables("ALL_HTTP")

RealAttrName = AttrName

Location = instr(AllAttrs, RealAttrName & ":")

If Location <= 0 Then

GetAttribute = ""

Exit Function

End If

Result = mid(AllAttrs, Location + Len(RealAttrName) + 1)

Location = instr(Result, chr(10))

If Location <= 0 Then Location = len(Result) + 1

GetAttribute = left(Result, Location - 1)

End Function

%>

【如何侦测HTTP表头信息?】相关文章:

如何决定是否将登录内容保存到Cookie里?

如何编写一个创建FTP站点的函数?

如何阻止别人非法链接你网站的图片?

如何对用户进行授权?

如何编写一个最简单的聊天程序?

如何终止浏览器的Cahce页面?

如何判断URL格式是否符合规范?

如何实现点击数的计算?

如何在读取Excel文件时创建列表的下拉菜单?

如何修改被表单引用的ASP页面?

精品推荐
分类导航