flash結(jié)合asp制作出的顯ip,版本,登陸時(shí)間,訪問次數(shù)_ASP教程
教程Tag:暫無Tag,歡迎添加,賺取U幣!
推薦:ASP中20個(gè)非常有用的技巧1.如何用Asp判斷你的網(wǎng)站的虛擬物理路徑 答:使用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),反正是沒有參照任何東西,自己動(dòng)手做的。 首先需要2個(gè)asp文件,1個(gè)文本文件,還有就是1個(gè)swf文件了。-------------------info.asp----------------------------
//這里是顯示ip,版本,登陸時(shí)間的 <!--#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=你登陸的時(shí)間是:"&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(可是自己設(shè)置初始值的)
---------------------------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í)候讀取登陸次數(shù),所以這里用到了onEnterFrame. //不然數(shù)字不能被刷新,我試了半天。
分享:關(guān)于Asp.net ajax下的異常處理最近做一個(gè)項(xiàng)目時(shí),大量應(yīng)用了Asp.net ajax,由于在UpdatePanel這種異步更新模式下,后臺(tái)處理時(shí)所發(fā)生的異常并不會(huì)導(dǎo)致客戶端的界面發(fā)生變化,而是直接以alert的方式彈出異常信息,所以我就偷了個(gè)懶,在后臺(tái)檢測(cè)到不符合要求的輸入之類的情況下,就直接把錯(cuò)
相關(guān)ASP教程:
- asp FSO 讀寫文件本文件實(shí)現(xiàn)代碼
- asp中isNull、isEmpty和空字符串的區(qū)別
- asp獲取用戶真實(shí)IP地址的方法
- asp連接sqlserver數(shù)據(jù)庫實(shí)現(xiàn)代碼
- asp中正則表達(dá)式過濾html代碼函數(shù)
- asp中g(shù)et post提交表單區(qū)別
- 網(wǎng)頁模板:ASP內(nèi)建對(duì)象Request
- xmlhttp的open方法使用詳解
- ASP的常用的自定義函數(shù)大全
- asp中用for循環(huán)的一個(gè)小技巧
- eWebEditor v3.8 列目錄
- ASP無組件分頁實(shí)現(xiàn)思路及代碼
ASP教程Rss訂閱編程教程搜索
ASP教程推薦
- ASP進(jìn)階:驗(yàn)證身份證號(hào)是否正確的代碼
- ASP教程:一個(gè)簡單的AJAX例子
- 淺談ASP編程的思路與糾錯(cuò)
- 用ASP程序?qū)崿F(xiàn)網(wǎng)站在線人數(shù)統(tǒng)計(jì)
- 如何用ASP實(shí)現(xiàn)對(duì)ORACLE數(shù)據(jù)庫的操作
- ASP常用函數(shù):CheckBoxScript()
- asp版域名查詢的數(shù)據(jù)庫接口
- 如何提高自己的編程水平
- ASP技巧實(shí)例:關(guān)于對(duì)表單操作的程序
- 使用 Osql 工具管理 SQL Server 桌面引擎 (MSDE 2000)應(yīng)用介紹
- 相關(guān)鏈接:
- 教程說明:
ASP教程-flash結(jié)合asp制作出的顯ip,版本,登陸時(shí)間,訪問次數(shù)
。