<html>
<body bgcolor="#FFFFFF">
<title>www.ttasp.net(Disclaimer/Referring Page Check)</title>
<%
script_name = request.servervariables("script_name")
'变量脚本名称会包括被请求的页面相对路径
the_link= "http://" & request.servervariables("HTTP_HOST") & script_name
'变量链接会包括http:// 和剩下的在第一个/之前的URL
the_referer= request.servervariables("http_referer")
‘变量引荐会跟踪最后的页面
‘用户是在点击链接之前让他们进入当前页面
‘如果进入了地址栏
‘点击来自邮件或者点击收藏夹引荐值为空
if (the_link <> the_referer) or (the_referer = "") then
‘检查看看引用页面是否也是当前页面
‘如果不显示否认声明和到当前页面的链接
%>
Disclaimer
<br>
You must read and agree to this prior to continuing on to the content
<br>
Click <a href="<%= script_name %>">here</a> to view content
<br>
Click <a href="javascript:history.go(-1)">here</a> to go back
<% else
‘如果用户点击了页面的链接回到这个页面然后
‘内容会是显示%>
Content
<br>
This will only display after the user has clicked a link<br>
making the referring and current page the same.
<% end if
'最后检查引用页面%>
</body>
</html>
热门信息
阅读 (109)
1 什么样的编程语言是最值得我们学习的呢?阅读 (109)
2 asp 如何解析api接口返回的xml阅读 (109)
3 ASP-数组阅读 (108)
4 asp网站伪静态化URL Rewrite中的httpd.ini伪静态化规则编写方法阅读 (105)
5 asp取access数据库里本周、本月、本季度的记录~