📄 ips.asp
字号:
<!--#include file="fn/conn.asp"-->
<%
sub Noip '清空IP地址
application("ip")=""
end sub
sub setdate '记录时间
application("date")=date()
end sub
sub countadd '将记录加1
set rs=server.createobject("adodb.recordset")
sql="select * from K_count where arttime=#"&date()&"#"
rs.open sql,conn,1,3
rs("count")=rs("count")+1
rs.update
rs.close
end sub
%>
<%
dtime=conn.execute("select arttime from K_count order by id desc")(0)
if dtime<>date() then
conn.execute("insert into K_count(arttime) values(#"&date()&"#)")
end if
%>
<%
if application("date")<>date() then
call noip
call setdate
end if
isip=1
ip=request.serverVariables("remote_addr")
if application("ip")="" then
application("ip")=ip&";"
call countadd
else
ips=split(application("ip"),";")
for i=0 to UBound(ips)
If ip=ips(i) Then
isip=0
Exit For
end if
next
if isip=1 then
application("ip")=application("ip")&ip&";"
call countadd
end if
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -