这段代码控制什么作用?

wenxiuyun 2004-09-30 07:37:40
<%
const addrurl="61.153.44.254"
const addserver="61.153.44.254"
if addrurl=Request.ServerVariables("Local_ADDR") or addserver=Request.ServerVariables("SERVER_NAME") or Request.ServerVariables("Local_ADDR")="61.153.44.254" or Request.ServerVariables("Local_ADDR")="192.168.0.2" or Request.ServerVariables("SERVER_NAME")="" or Request.ServerVariables("SERVER_NAME")="" then
response.write("")
else
response.Write("<br><br><center><font color=red>你使用的版本没有经过官方授权,只能在本机使用。</font></center>")
response.Write("<br><center>需要在服务器上使用请联系QQ:113667632")
response.End()
end if
%>


下一段:
<!--#include file="strurl.asp"-->
<%
const httpurl="61.153.44.254"
const httpserver="61.153.44.254"
const strVersion = "Ad163.net网站管理系统"
if httpurl=Request.ServerVariables("Local_ADDR") or httpserver=Request.ServerVariables("SERVER_NAME") or Request.ServerVariables("Local_ADDR")="61.153.44.254" or Request.ServerVariables("Local_ADDR")="192.168.0.2" or Request.ServerVariables("SERVER_NAME")="www.pv-w.com" or Request.ServerVariables("SERVER_NAME")="pv-w.com" then
response.write("")
else
response.redirect "QQ:113667632"
response.End()
end if

Dim UserAgent
UserAgent = Trim(Lcase(Request.Servervariables("HTTP_USER_AGENT")))
If InStr(UserAgent,"teleport") > 0 or InStr(UserAgent,"webzip") > 0 or InStr(UserAgent,"flashget")>0 or InStr(UserAgent,"offline")>0 Then
Response.Write "请不要采用teleport/Webzip/Flashget/Offline等工具来浏览网站!"
Response.End
End If

Function FormatSQL(strChar)
if strChar="" then
FormatSQL=""
else
FormatSQL=replace(replace(replace(replace(replace(replace(replace(replace(strChar,"'","’"),"*","×"),"?","?"),"(","("),")",")"),"<","〈"),".","。"),";",";")
end if
End Function

Function SafeRequest(ParaName,ParaType)
Dim ParaValue
ParaValue=Request(ParaName)
If ParaType=1 then
If not isNumeric(ParaValue) then
Response.write "<center>参数" & ParaName & "必须为数字型!</center>"
Response.end
End if
Else
ParaValue=replace(ParaValue,"'","''")
End if
SafeRequest=ParaValue
End function
%>
...全文
74 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
luoluonozuoluo 2004-10-01
  • 打赏
  • 举报
回复
<%
const addrurl="61.153.44.254"
const addserver="61.153.44.254"
if addrurl=Request.ServerVariables("Local_ADDR") or addserver=Request.ServerVariables("SERVER_NAME") or Request.ServerVariables("Local_ADDR")="61.153.44.254" or Request.ServerVariables("Local_ADDR")="192.168.0.2" or Request.ServerVariables("SERVER_NAME")="" or Request.ServerVariables("SERVER_NAME")="" then
response.write("")
else
response.Write("<br><br><center><font color=red>你使用的版本没有经过官方授权,只能在本机使用。</font></center>")
response.Write("<br><center>需要在服务器上使用请联系QQ:113667632")
response.End()
end if
%>


下一段:
<!--#include file="strurl.asp"-->
<%
const httpurl="61.153.44.254"
const httpserver="61.153.44.254"
const strVersion = "Ad163.net网站管理系统"
if httpurl=Request.ServerVariables("Local_ADDR") or httpserver=Request.ServerVariables("SERVER_NAME") or Request.ServerVariables("Local_ADDR")="61.153.44.254" or Request.ServerVariables("Local_ADDR")="192.168.0.2" or Request.ServerVariables("SERVER_NAME")="www.pv-w.com" or Request.ServerVariables("SERVER_NAME")="pv-w.com" then
response.write("")
else
response.redirect "QQ:113667632"
response.End()
end if
这两段卡擦掉就可以啦。
wenxiuyun 2004-10-01
  • 打赏
  • 举报
回复
这些代码怎样让它不限制服务使用?
手机APP开发 2004-10-01
  • 打赏
  • 举报
回复
测试一下吧
response.write HTTP_USER_AGENT
看看什么结果吧
手机APP开发 2004-10-01
  • 打赏
  • 举报
回复
第一段是限制IP地址和本地计算机名的
HTTP_USER_AGENT好象是检查用户浏览器的吧,记不太清了。。。
wenxiuyun 2004-09-30
  • 打赏
  • 举报
回复
这里好像是控制只能在本机测试使用,不能上传到服务上使用,怎样才能在服务器上使用呢?
wenxiuyun 2004-09-30
  • 打赏
  • 举报
回复
是的
echina 2004-09-30
  • 打赏
  • 举报
回复
是一个管理网站的系统吧

28,390

社区成员

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

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