) ′取得 IP 地址第三个段的值并保存到 strip 中 fori=1to2 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”orstrip<“1”orstrip>“50”)andrequest(“Passwd”)<>“asp” then %> <p><fontcolor=“#FF0000”>对不起,你的 IP 是<%=rip%>,本页面可以访问的 IP 是 127.1.1.*到 127.1.50.*之间,如果你是本单位内部网的用户,请确认你的浏览器没有 使用代理!<BR></font></p> <formaction=“demo.asp”method=“POST”id=form1name=form1>
<p>请输入访问密码: <inputtype= “pass
word” name= “Passwd” ><inputtype= “submit” value=“确认”name=“B1”>; </p> </form> <%else%> ′合法用户可以访问的页面,在此可以加入任何信息 祝贺您,您已经顺利通过了页面的安全认证,可以直接使用本站点的资源! <%endif%> </body