欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

如何侦测HTTP表头信息?

程序员文章站 2022-05-03 15:40:41
千花飞舞之http headers侦...</div> <div class="content"> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><html></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><head></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><title> </span><span style="font-family: 宋体; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'">千花飞舞之</span><span lang="en-us">http headers</span><span style="font-family: 宋体; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'">侦测</span><span lang="en-us">< /title></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"></head></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><body></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><table border=1></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><tr><td valign=top><b></span><span style="font-family: 宋体; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'">变量</span><span lang="en-us"></b></td></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><td valign=top><b></span><span style="font-family: 宋体; mso-ascii-font-family: 'times new roman'; mso-hansi-font-family: 'times new roman'">值</span><span lang="en-us"></b></td></tr></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><% for each key in request.servervariables %></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><tr></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><td><% = key %></td></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><td></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><%</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">if request.servervariables(key) = "" then</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">if getattribute(key) = "" then</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">response.write " " </span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">else</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">response.write getattribute(key)</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">end if</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">else </span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">response.write request.servervariables(key)</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">end if</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">response.write "</td>"</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">%></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"></tr></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><% next %></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"></table></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"></body></html></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"> <?xml:namespace prefix="o" ns="urn:schemas-microsoft-com:office:office"?><p></p></span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><% </span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">function getattribute(attrname)</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">dim allattrs</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">dim realattrname</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">dim location</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">dim result</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">allattrs = request.servervariables("all_http")</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">realattrname = attrname</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">location = instr(allattrs, realattrname & ":")</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">if location <= 0 then</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">getattribute = ""</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">exit function</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">end if</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">result = mid(allattrs, location + len(realattrname) + 1)</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">location = instr(result, chr(10))</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">if location <= 0 then location = len(result) + 1</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">getattribute = left(result, location - 1)</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us">end function</span></p> <p class="msonormal" style="margin: 0cm 0cm 0pt"><span lang="en-us"><span style="mso-spacerun: yes"> </span>%></span></p> </div> <div class="info-pre-next"> <p> 上一篇: <a href="/article/840433.html"> 如何用Cookie进行登录验证? </a> </p> <p> 下一篇: <a href="/article/840435.html"> 基于jQuery实现Ajax验证用户名是否可用实例 </a> </p> </div> <div class="wz_tuijian"> <p> 推荐阅读 </p> <ul> <li> <a href="/article/1970941.html" target="_blank" title="如何侦测HTTP表头信息?"> <h2> 如何侦测HTTP表头信息? </h2> </a> </li> <li> <a href="/article/1672783.html" target="_blank" title="防止网页被别人的网站iframe,服务端如何设置HTTP头部中的X-Frame-Options信息?"> <h2> 防止网页被别人的网站iframe,服务端如何设置HTTP头部中的X-Frame-Options信息? </h2> </a> </li> <li> <a href="/article/1432696.html" target="_blank" title="JavaScript如何获取到导航条中HTTP信息"> <h2> JavaScript如何获取到导航条中HTTP信息 </h2> </a> </li> <li> <a href="/article/1313979.html" target="_blank" title="验证码-php中如何用curl模拟http头信息进行模拟登陆并获取信息"> <h2> 验证码-php中如何用curl模拟http头信息进行模拟登陆并获取信息 </h2> </a> </li> <li> <a href="/article/1156364.html" target="_blank" title="http - php,curl如何查看发出的post请求的信息"> <h2> http - php,curl如何查看发出的post请求的信息 </h2> </a> </li> <li> <a href="/article/1082410.html" target="_blank" title="http - php,curl如何查看发出的post请求的信息"> <h2> http - php,curl如何查看发出的post请求的信息 </h2> </a> </li> <li> <a href="/article/1070164.html" target="_blank" title="http - php的curl如何使用head协议来获取资源的大小等信息"> <h2> http - php的curl如何使用head协议来获取资源的大小等信息 </h2> </a> </li> <li> <a href="/article/1056887.html" target="_blank" title="http - php的curl如何使用head协议来获取资源的大小等信息"> <h2> http - php的curl如何使用head协议来获取资源的大小等信息 </h2> </a> </li> <li> <a href="/article/840434.html" target="_blank" title="如何侦测HTTP表头信息?"> <h2> 如何侦测HTTP表头信息? </h2> </a> </li> <li> <a href="/article/655180.html" target="_blank" title="防止网页被别人的网站iframe,服务端如何设置HTTP头部中的X-Frame-Options信息?"> <h2> 防止网页被别人的网站iframe,服务端如何设置HTTP头部中的X-Frame-Options信息? </h2> </a> </li> </ul> </div> </article> </div> </main> <footer><div class="box"><div class="ft_nav"><div class="ft_about"><p>关于网站</p><ul><li><a href="/sitemap.xml" target="_blank" title="网站地图">网站地图</a></li><li><a href="/list/2/" title="最新程序员文章站">最新程序员文章站</a></li></ul></div><div class="ft_contact"><ul><li>本站所有数据收集于网络如有侵犯到您的权益,请联系我们进行下架处理。</li><li class="email_show"></li></ul></div></div><div class="copyright"><div class="cr_left"><p> 备案号:<a href="https://beian.miit.gov.cn/#/Integrated/index" target="_blank">粤ICP备20058927号</a></p><p>© Copyright © 2020-2022 www.superweb999.com 程序员文章站. </p></div></div></div></footer> </body> </html>