限制国内IP访问国外网站的ASP程序
发布:vip | 发布时间: Saturday, June 25, 2011erverVariables("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
发布:vip | 分类:外贸SOHO网站建设 | 评论:0 | 引用:0 | 浏览:
| TrackBack引用地址
- 相关文章:
发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。





