源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

如何侦测HTTP表头信息?

  • 时间:2020-02-25 11:04 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:如何侦测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  %>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部