當前位置:首頁 » 密碼管理 » asp獲取訪問者

asp獲取訪問者

發布時間: 2024-09-02 00:54:37

『壹』 asp中怎樣獲取訪問者的IP地址

ip = request.servervariables("remote_addr") '獲取訪問者的ip
now_time = now '獲取登陸時間(伺服器時間)

完整的代碼如下
dim
conn,rs,ip,now_time
set
conn=server.createobject("adodb.connection")
dbpath =
server.mappath("資料庫路徑")
conn.open "driver={microsoft access driver
(*.mdb)};dbq=" & dbpath
set
rs=server.createobject("adodb.recordset")
sql = "表名"
rs.open
sql,conn,3,2
rs.addnew
ip = request.servervariables("remote_addr")
'獲取訪問者的ip
now_time = now '獲取登陸時間(伺服器時間)
rs("欄位名1") = ip
rs("欄位名2") = now_time
rs.update

『貳』 怎麼實現你是第幾為訪問者的統計(ASP)

在資料庫裡面寫一個欄位,每次載入頁面的時候都往裡面+1
這些統計網上都有很專業的統計系統,比如cnzz
注冊個帳號 調用下他的代碼就能看到很詳細的數據,有樹樁統計表,還能看到幾個ip,來自哪個省份

『叄』 ASP怎麼查看在線訪問者的IP地址

分類: 電腦/網路 >> 程序設計 >> 其他編程語言
問題描述:

訪問者訪問一個蠢含IP。ASP文件,能獲得他的IP,而我們能同時從另外一個頁面LOADIP。ASP文件看到他的IP,這段代碼要怎麼寫呀,我寫了出來能獲得IP,但是就是我們不能同時從另外一個顫笑頁面看到訪問者的IP,哪位大俠能教教我!

IP。ASP 代碼

<% Application.Lock()

Application("Userip") = Request.ServerVariables("HTTP_X_FORWARDED_FOR")

If Application("Userip") = "" Then Application("Userip") = Request.ServerVariables("REMOTE_ADDR")

Session("Userip")=Application("Userip")

Application.UnLock()

Response.Redirect("loadip")

%>

LOADIP。ASP代碼

<%

if Session("userip") <> "" then

online=Response.IsClientConnected

online=true

userip=Session("userip")

Response.Write"<table border=1 align=center>"

Response.Write"<tr><td width=100>"

Response.Write("來訪者IP:")

Response.Write"<帶洞笑/td><td width=200 align=center><a href=#>"

Response.Write(userip)

Response.Write("</a></td><td>")

Response.Write(date())

Response.Write("</td></tr></table>")

else

Response.Write("<div align=center>")

Response.Write("沒有來訪者")

Response.Write("</div>")

end if

%>

哪裡錯了,哪位大哥大姐幫幫我!

解析:

沒有錯誤,請問你是那裡報錯?本地和遠程調試都未出現錯誤啊?

=============

你能解釋一下「同時」是個什麼意思么?

你的意思是你打開一個頁面,如果有訪問者登陸後,你打開的那個頁面就立即顯示出登陸者的IP?

熱點內容
資料庫原理電子書 發布:2025-10-16 23:48:49 瀏覽:945
寫安卓學什麼 發布:2025-10-16 23:18:13 瀏覽:541
同花順怎麼無法連接伺服器 發布:2025-10-16 23:12:34 瀏覽:836
視頻壓縮碼率 發布:2025-10-16 23:08:57 瀏覽:44
怎麼重新注冊密碼 發布:2025-10-16 22:35:27 瀏覽:997
存儲卡不顯示盤符怎麼辦 發布:2025-10-16 22:24:15 瀏覽:518
python列表轉集合 發布:2025-10-16 22:09:35 瀏覽:966
jsrsa公鑰加密 發布:2025-10-16 22:01:17 瀏覽:430
四平地區dns伺服器ip 發布:2025-10-16 21:39:55 瀏覽:621
4huftp 發布:2025-10-16 21:34:03 瀏覽:646