Ê×ÏÈÐèÒª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
%>
-----------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. //²»È»Êý×Ö²»Äܱ»Ë¢Ð£¬ÎÒÊÔÁË°ëÌì¡£