欢迎您访问我爱IT技术网,今天小编为你分享的编程技术是:【flash结合asp制作出的显ip,版本,登陆时间,访问次数】,下面是详细的分享!
flash结合asp制作出的显ip,版本,登陆时间,访问次数
也不知道算不算原创,反正是没有参照任何东西,自己动手做的。 首先需要2个asp文件,1个文本文件,还有就是1个swf文件了。-------------------info.asp----------------------------
//这里是显示ip,版本,登陆时间的 <!--#include file="num.asp"-->
<%
set userip=Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip="" Then userip=Request.ServerVariables("REMOTE_ADDR")
response.write("&t0=你的ip地址是:"&userip)
set ie=Request.ServerVariables("HTTP_USER_AGENT")
response.write("&t1=你的浏览器版本和操作系统是:"&ie)
response.write("&t2=你登陆的时间是:"&now())
%>---------------------------num.asp-----------------------------
//这里是显示登陆次数和把登陆次---------------------------数记录到文本中
<%
dim visitors
whichfile=server.mappath("time.txt")
set fs=createobject("Scripting.FileSystemObject")
set thisfile=fs.opentextfile(whichfile)
visitors=(thisfile.readline)
thisfile.close visitors=visitors+1
response.write ("&num="&visitors)
set out=fs.createtextfile(whichfile)
out.writeLine(visitors)
out.close
set fs=nothing
%> -----------http://www.devdao.com/----------time.txt--------------------
//这里是记录登陆次数 2921(可是自己设置初始值的)
---------------------------info.swf-----------------
//这是通过flash显示出以上数据 插入到第一针:
init();
function init() {
settxt();
run();
System.useCodepage=true;
loadVariablesNum("num.asp", "", "POST");
}
function settxt() {
for (i=0; i<4; i++) {
this.createTextField("txt"+i, i, 10, 100+30*i, 90, 0);
this["txt"+i].autoSize="left";
this["txt"+i].border=true;
}
}
function run() {
lv=new LoadVars();
lv.onLoad=function(ok) {
if (ok) {
for (i=0; i<3; i++) {
_root["txt"+i].text=this["t"+i];
}
delete this.onLoad;
}
};
lv.load("info.asp", "", "POST");
onEnterFrame=function () {
txt3.text=num;//为了能够刷新的时候读取登陆次数,所以这里用到了onEnterFrame. //不然数字不能被刷新,我试了半天。
以上所分享的是关于flash结合asp制作出的显ip,版本,登陆时间,访问次数,下面是编辑为你推荐的有价值的用户互动:
相关问题:flash可以 直接访问 asp吗
答:给你个例子吧 在flash中使用asp需要的条件: 1。你的isp的server必须支持active server pages并且最好支持数据库 2。你应该要安装flash 4 3。需要你对asp有初步的了解 ok,下面具体介绍怎么使用: 数据库结构: 第一步要做的是建立数据库.例子中... >>详细
相关问题:FLASH 获取ASP参数
答:可以模拟一下。在flash中设一个变量,javascript控制改变这个变量的值,flash一检测到此变 量值改变,变执行函数; flash 代码: var stat=0; setInterval(test,300){ if (stat==1) doFlash(); } function doFlash(){ } javascript 代码(tt为htm... >>详细
相关问题:Flash 和 Asp 交互 地址问题
答:这个地址是在自己的电脑上测试用的 别人无法访问 你需要申请一个支持asp的空间,将文件都上传 然后将网址发给你的朋友,他们才能看 >>详细
- 评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)
-
