如何阻止留言簿中的IP地址? [英] How to block IP address in a guestbook?

查看:45
本文介绍了如何阻止留言簿中的IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用免费的数据库驱动的ASP留言簿。我想添加一个IP地址

阻止过滤器(只是阻止一个特定的访客)。

最简单的方法是什么?谢谢。


pcchong

I use a free database-driven ASP guestbook. I want to add a IP address
blocking filter to it( just to block one particular guest). What is the
easiest way to do so? Thanks.

pcchong

推荐答案



" pcchong" < PC ***** @ singnet.com.sg>在消息中写道

新闻:eu ************* @ TK2MSFTNGP12.phx.gbl ...

"pcchong" <pc*****@singnet.com.sg> wrote in message
news:eu*************@TK2MSFTNGP12.phx.gbl...
我使用免费数据库 - 驱动ASP留言簿。我想为它添加一个IP地址
阻塞过滤器(只是阻止一个特定的访客)。最简单的方法是什么?谢谢。
I use a free database-driven ASP guestbook. I want to add a IP address
blocking filter to it( just to block one particular guest). What is the
easiest way to do so? Thanks.



把它放在第一个ASP的开头(改为111.222.333到你的

enemys IP地址)...
然后

Response.End

结束如果

%>


Put this at the beginning of the first ASP (change "111.222.333" to your
enemys IP address) ...

<%
if Request.ServerVariables("REMOTE_ADDR") = "111.222.333" then
Response.End
end if
%>


" pcchong"在消息新闻中写道:eu ************* @ TK2MSFTNGP12.phx.gbl ...

:我使用免费的数据库驱动的ASP留言簿。我想添加一个IP地址

:阻止过滤器(只是阻止一个特定的访客)。什么是

:这是最简单的方法吗?谢谢。


我不知道你来自哪里[IP地址]所以你必须

修改这个,但包括方向。我正在将每个人重定向为

的例子。修改相应的行,然后将其放在

页面的顶部,以阻止某人。但是,如果他们的IP是动态的,那么你需要修改它以阻止IP范围。


<%@ Language = VBScript% >

<%

选项明确

Response.Buffer = True

昏暗的outtahair,访问者,strURL

strURL =" http://www.fbi.gov/mostwant.htm" ''为目标修改此行

重定向主机

outtahair = Request.ServerVariables(" REMOTE_HOST")

''删除上面的行并取消注释以下一个替换xxxx与

IP重定向

''outtahair =" xxxx"

visitor = Request.ServerVariables( REMOTE_HOST)

如果访问者= outtahair那么

Response.Clear()

Response.Redirect(strURL)

结束如果

%>

http://kiddanger.com/lab/remotehostredirect.asp

HTH ...


- -

Roland Hall

/ *这些信息的分发是希望它有用,但

没有任何保证;甚至没有适销性的暗示保证

或特定用途的适用性。 * /

Technet脚本中心 - http:// www .microsoft.com / technet / scriptcenter /

WSH 5.6文档 - http://msdn.microsoft.com/downloads/list/webdev.asp

MSDN Library - http://msdn.microsoft.com/library/default.asp
"pcchong" wrote in message news:eu*************@TK2MSFTNGP12.phx.gbl...
: I use a free database-driven ASP guestbook. I want to add a IP address
: blocking filter to it( just to block one particular guest). What is the
: easiest way to do so? Thanks.

I don''t know where you''re coming from [IP address] so you would have to
modify this but directions are included. I''m redirecting everyone as an
example. Modify the appropriate lines and then put this at the top of your
page where you want to block someone. However, if their IP is dynamic, then
you''d need to modify it to block IP ranges.

<%@ Language=VBScript %>
<%
Option Explicit
Response.Buffer = True
dim outtahair, visitor, strURL
strURL = "http://www.fbi.gov/mostwant.htm" '' modify this line for target
redirect host
outtahair = Request.ServerVariables("REMOTE_HOST")
'' Delete the line above and uncomment the one below replacing x.x.x.x with
IP to redirect
'' outtahair = "x.x.x.x"
visitor = Request.ServerVariables("REMOTE_HOST")
if visitor = outtahair then
Response.Clear()
Response.Redirect(strURL)
end if
%>

http://kiddanger.com/lab/remotehostredirect.asp

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp


2004年5月19日星期三19:29:20 +0800,PW < pw*@NObigSPAMpond.net.au>

写道:
On Wed, 19 May 2004 19:29:20 +0800, "PW" <pw*@NObigSPAMpond.net.au>
wrote:

" pcchong" < PC ***** @ singnet.com.sg>在消息中写道
新闻:eu ************* @ TK2MSFTNGP12.phx.gbl ...

"pcchong" <pc*****@singnet.com.sg> wrote in message
news:eu*************@TK2MSFTNGP12.phx.gbl...
我使用免费的数据库驱动的ASP留言簿。我想为它添加一个IP地址
阻塞过滤器(只是阻止一个特定的访客)。最简单的方法是什么?谢谢。
I use a free database-driven ASP guestbook. I want to add a IP address
blocking filter to it( just to block one particular guest). What is the
easiest way to do so? Thanks.



把它放在第一个ASP的开头(改为111.222.333到你的
enemys IP地址)......
然后
Response.End
结束如果
%>


Put this at the beginning of the first ASP (change "111.222.333" to your
enemys IP address) ...

<%
if Request.ServerVariables("REMOTE_ADDR") = "111.222.333" then
Response.End
end if
%>




更好的是检查地址,如果是不允许,只是

不更新留言簿。让他们完成整个过程,谢谢他们为他们的参赛作品
,只是不记录。 :)


Jeff



Better would be to check the address and if it''s not allowed, simply
not update the guestbook. Let them go through the process, thank them
for their entry, just don''t record it. :)

Jeff


这篇关于如何阻止留言簿中的IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆