魔兽电影字幕,花都秀全中学,10月15日是什么节日
online.文件
<!--#include file="dbconn.asp" -->
<%
onlinetimeout=10 定义在线活动时间的时间间隔
function userip()
getclientip = request.servervariables("http_x_forwarded_for") 获得用户的虚拟ip地址
if getclientip = "" or isnull(getclientip) or isempty(getclientip) then
getclientip = request.servervariables("remote_addr") 如果未使用代理服务器,就获得来源的ip地址
end if
userip = getclientip
end function
sql="select o_id from c_online where o_ip= "&userip()&" " 在中查找所获得 的ip地址的id
set rs=conn.execute(sql)
if rs.eof and rs.bof then
sql="insert into c_online(o_ip) values( "&userip()&" )" 如果数据库中没有就表明是新ip,那么插入操作
conn.execute(sql)
else
sql="update c_online set o_ltime=now() where o_ip= "&userip()&" " 更数据库的当前时间
conn.execute(sql)
end if
sql="delete from c_online where dateadd(s,"&onlinetimeout*60&",o_ltime) < now()" 定义十分钟刷新
conn.execute(sql)
rs.close
set rs=nothing
function allonline()
tmprs=conn.execute("select count(o_id) from c_online")
allonline=tmprs(0)
set tmprs=nothing
end function
%>
<%response.write "document.write(""在线"&allonline()&"人"")"%>
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Net Core Web Api项目与在NginX下发布的方法
asp.net core3.1 引用的元包dll版本兼容性问题解决方案
IdentityServer4实现.Net Core API接口权限认证(快速入门)
ASP.NET Core MVC通过IViewLocationExpander扩展视图搜索路径的实现
网友评论