ips.asp

来自「这次自已做的美工,可能很难看,但主要是为提高效率,这次全部生成了静态,只有一个链」· ASP 代码 · 共 48 行

ASP
48
字号
<!--#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 + =
减小字号Ctrl + -
显示快捷键?