for i=1 to 2
strip=right(strip,len(strip)-instr(1,strip,“.”))
next
strip=left(strip,instr(1,strip,“.”)-1)
′IP地址有效性检验及密码验证,包括两方面的内容:
′如果IP地址符合则通过验证;如果IP地址不符合则检验输入的密码是否正确(此处密码为“asp”) if (left(rip,5) <> “127.1” or strip<“1” or strip>“50”) and request(“Passwd”)<>“asp” then
%>
<p><font color=“#FF0000”>对不起,你的IP是<%=rip%>,本页面可以访问的IP是127.1.1.*到127.1.50.*之间,如果你是本单位内部网的用户,请确认你的浏览器没有使用代理!<BR></font></p>
<form action=“demo.asp” method=“POST” id=form1 name=form1>
<p>请输入访问密码:<input type=“password” name=“Passwd” > <input type=“submit” value=“确认” name=“B1”>;
</p>
</form>