当前位置: 移动技术网 > IT编程>开发语言>其他编程 > 如何侦测HTTP表头信息?

如何侦测HTTP表头信息?

2017年12月08日  | 移动技术网IT编程  | 我要评论

<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

 %>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网