否认声明/引用页检查
来源:互联网 发布:linux 入门基础教程 编辑:程序博客网 时间:2024/04/29 23:28
有种例子是你想查证用户点击链接获取某一个内容或者被浏览到否认声明,通过用户点击可以同意。这个例子会检查看是什么引用页,引用页不是跟当前页面位置相同而是一个显示的默认的浏览视图。提供给用户点击页面链接,然后内容显示的功能。
<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>
<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>
0 0
- 否认声明/引用页检查
- 一淘网发声明否认胁迫导航网站合作
- JQuery引用检查
- 声明、请求和检查许可
- C++ 向前引用声明
- 前向引用声明
- Rvalue引用声明:&&
- &--引用声明符
- 规则引用声明符:&&
- 前向引用声明
- 前向引用声明
- studio 引用aar 声明
- 引用性声明和定义性声明
- 变量的声明和引用
- C++前向引用声明
- JavaScript插入 引用 声明变量
- [Erlang]类型声明及检查详解
- 【分析】声明“双重检查锁坏了”
- AWS云平台的服务概览
- javascript判断对象、字符串、数组是否为空(兼容绝大部分浏览器)
- android string.xml 特殊字符处理
- GitHub基本使用方法
- Linux如何禁用root账户
- 否认声明/引用页检查
- C/C++ Typedef和define的区别
- Matlab 变量和语句
- 手机安装busybox
- 0基础,30岁,我都学会了,你还犹豫什么?
- 杂记
- 设计模式
- php远程连接oracle
- java网络编程之缓存(一)