It is very troublesome to not cross the domain of cookies, and it is much more convenient to have this script.
<%
ip=Request.ServerVariables("REMOTE_ADDR")
setFso=CreateObject("Scripting.FileSystemObject")
SetFiles=Fso.OpenTextFile(server.mappath("./ip.txt"),1,false)
data=files.readall
files.close
setfso=nothing
ifInstrRev(data,ip,-1,0)=0then
setFso=CreateObject("Scripting.FileSystemObject")
SetFile=Fso.OpenTextFile(server.mappath("./ip.txt"),8,true)
file.writelineip
file.close
setfso=nothing
response.write "This IP accesses this page for the first time today"
response.end
else
response.write "This IP has been visited before"
response.end
endif
%>