谁能解决得了这个???

aduuchin 2003-03-20 05:11:34
我用了如下代码(是从某个地方抄来的):
Request.ServerVariables("HTTP_X_FORWARDED_FOR")来检查访问这事不是用了代理。可就是调不出来。
我在本地设了个服务器,在本地用了代理服务器测试的。可以得到 Request.ServerVariables("REMOTE_ADDR")得值,而判断的部分不行。指出来'没有用'的信息
Request.ServerVariables("HTTP_X_FORWARDED_FOR")是对的吗??

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
response.write "<font color=#FF0000>您通过了代理服务器," & "真实的IP为" &

Request.ServerVariables("HTTP_X_FORWARDED_FOR")
else
response.write "您没有用代理 "
end if
%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body >

<%=Request.ServerVariables("REMOTE_ADDR")%>
</body>
</html>
...全文
30 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
aduuchin 2003-03-20
  • 打赏
  • 举报
回复
http://202.4.143.136/ip1.asp
aduuchin 2003-03-20
  • 打赏
  • 举报
回复
还是不行啊~~~
我的IP是202.4.143.136
http://202.4.143.136/ip1.asp
aduuchin 2003-03-20
  • 打赏
  • 举报
回复
帮我~~~~~~~~~~~~~~~~~~~~~``
lbd8848 2003-03-20
  • 打赏
  • 举报
回复
更正:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
response.write "<font color=#FF0000>您通过了代理服务器," & "真实的IP为" &_
Request.ServerVariables("HTTP_X_FORWARDED_FOR")
else
response.write "您没有用代理 "
end if
%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body >

<%=Request.ServerVariables("REMOTE_ADDR")%>
</body>
</html>
lbd8848 2003-03-20
  • 打赏
  • 举报
回复
你的代码是复制的吧,使用这段代码试试
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
response.write "<font color=#FF0000>您通过了代理服务器," & "真实的IP为" &

Request.ServerVariables("HTTP_X_FORWARDED_FOR")
else
response.write "您没有用代理 "
end if
%>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>

<body >

<%=Request.ServerVariables("REMOTE_ADDR")%>
</body>
</html>
aduuchin 2003-03-20
  • 打赏
  • 举报
回复
??????????????????????????

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧