flash結合asp制作出的顯ip,版本,登陸時間,訪問次數(shù)_ASP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:ASP中20個非常有用的技巧1.如何用Asp判斷你的網站的虛擬物理路徑 答:使用Mappath方法 p align=center font size=4 face=Arial b The Physical path to this virtual website is: /b /font font color=#FF0000 size=6 face=Arial %= Server.MapPath(\)% /font /p 2.我如何知道使用者
也不知道算不算原創(chuàng),反正是沒有參照任何東西,自己動手做的。 首先需要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=你的瀏覽器版本和操作系統(tǒng)是:"&ie)
response.write("&t2=你登陸的時間是:"&now())
%>---------------------------num.asp-----------------------------
//這里是顯示登陸次數(shù)和把登陸次---------------------------數(shù)記錄到文本中
<%
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--------------------
//這里是記錄登陸次數(shù) 2921(可是自己設置初始值的)
---------------------------info.swf-----------------
//這是通過flash顯示出以上數(shù)據(jù) 插入到第一針:
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;//為了能夠刷新的時候讀取登陸次數(shù),所以這里用到了onEnterFrame. //不然數(shù)字不能被刷新,我試了半天。
分享:關于Asp.net ajax下的異常處理最近做一個項目時,大量應用了Asp.net ajax,由于在UpdatePanel這種異步更新模式下,后臺處理時所發(fā)生的異常并不會導致客戶端的界面發(fā)生變化,而是直接以alert的方式彈出異常信息,所以我就偷了個懶,在后臺檢測到不符合要求的輸入之類的情況下,就直接把錯
相關ASP教程:
- 相關鏈接:
- 教程說明:
ASP教程-flash結合asp制作出的顯ip,版本,登陸時間,訪問次數(shù)
。