erverVariables("REMOTE_ADDR")="113.97.238.13" thenResponse.Write "您的IP已被禁止,无权访问本站!"end if %>不带提示<%if Request.ServerVariables("REMOTE_ADDR")="113.97.238.13" thenResponse.Write""end if %>

 

-------------------------------------------------------------------------------------------------------------

ip=request.ServerVariables("REMOTE_ADDR")severip=...(用户试图访问的网站的IP)if NOT IsForeignIP(ip) then   if IsForeignIP(severip) then      response.write "国内IP不允许访问国外网站!"      response.end   end ifend ifPrivate Function IsForeignIP(ip)   '通过连接IP数据库,或获取其他可以识别IP的网站的处理结果来判断IP的归属地,如www.ip138.comEnd Function