数码资讯
使用ASP脚本限制对IP的访问
饼干很难跨越域,而且拥有这个脚本要方便得多。
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
饼干很难跨越域,而且拥有这个脚本要方便得多。
<
IP = request.servervariables(remote_addr )
设置FSO = CreateObject(脚本。FileSystemObject )
设置文件fso.opentextfile(server.mappath(, / IP .txt),1,假)
数据files.readall
files.close
设置FSO
如果InstrRev(数据、IP、- 1, 0)= 0
设置FSO = CreateObject(脚本。FileSystemObject )
设置文件= fso.opentextfile(server.mappath(, / IP .txt),8,真的)
file.writeline IP
关闭文件
设置FSO
response.write 这个IP访问这个页面在今天第一次。
response.end
其他的
response.write此IP已被访问过。
response.end
最后如果
%>
<
IP = request.servervariables(remote_addr )
设置FSO = CreateObject(脚本。FileSystemObject )
设置文件fso.opentextfile(server.mappath(, / IP .txt),1,假)
数据files.readall
files.close
设置FSO
如果InstrRev(数据、IP、- 1, 0)= 0
设置FSO = CreateObject(脚本。FileSystemObject )
设置文件= fso.opentextfile(server.mappath(, / IP .txt),8,真的)
file.writeline IP
关闭文件
设置FSO
response.write 这个IP访问这个页面在今天第一次。
response.end
其他的
response.write此IP已被访问过。
response.end
最后如果
%>
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。