如何侦测HTTP表头信息?
<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
%>
上一篇: 如何用Cookie进行登录验证?
推荐阅读
-
如何侦测HTTP表头信息?
-
防止网页被别人的网站iframe,服务端如何设置HTTP头部中的X-Frame-Options信息?
-
JavaScript如何获取到导航条中HTTP信息
-
验证码-php中如何用curl模拟http头信息进行模拟登陆并获取信息
-
http - php,curl如何查看发出的post请求的信息
-
http - php,curl如何查看发出的post请求的信息
-
http - php的curl如何使用head协议来获取资源的大小等信息
-
http - php的curl如何使用head协议来获取资源的大小等信息
-
如何侦测HTTP表头信息?
-
防止网页被别人的网站iframe,服务端如何设置HTTP头部中的X-Frame-Options信息?