#T= 取上一页地址
Request.ServerVariables("HTTP_REFERER")
#T= 取服务器的名称1
Request.ServerVariables("SERVER_NAME")
#T= 取服务器的名称2
Request.ServerVariables("HTTP_HOST")
#T= 取服务器IP
Request.ServerVariables("LOCAL_ADDR")
#T= 取用户IP
Request.ServerVariables("Remote_Host")
#T= 取用户真实IP1
Request.serverVariables("REMOTE_ADDR")
#T= 取用户真实IP函数
Function GetRealIP()
GetRealIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
IF(GetRealIP = "")THEN GetRealIP = Request.ServerVariables("REMOTE_ADDR")
End Function
#T= 取服务器端口
Request.ServerVariables("SERVER_PORT")
#T= 取服务器操作系统
Request.ServerVariables("OS")
#T= 取服务器的绝对路径
Request.ServerVariables("APPL_PHYSICAL_PATH")
#T= 取本文件的绝对路径1
Requet.ServerVariables("PATH_TRANSLATED")
#T= 取本文件的绝对路径2
Server.mappath(Request.ServerVariables("SCRIPT_NAME"))
#T= 取本文件的相对路径1
Request.ServerVariables("URL")
#T= 取本文件的相对路径2
Request.ServerVariables("SCRIPT_NAME")
#T= 取本文件的相对路径3
Request.ServerVariables("PATH_INFO")
#T= 取地址栏后的参数
Request.ServerVariables("QUERY_STRING")
#T= 取服务器系统信息
Request.ServerVariables("HTTP_USER_AGENT")
#T= 服务器组件检测
<%
Function IsObjInstalled(strClassString)
On Error Resume Next
IsObjInstalled = False
Err = 0
Dim xTestObj
SET xTestObj = Server.CreateObject(strClassString)
IF(0 = Err)THEN IsObjInstalled = True
SET xTestObj = Nothing
Err = 0
End Function
'IF(IsObjInstalled("Persits.Upload")=True)THEN
' Response.Write "支持AspUpload组件"
'ELSE
' Response.Write "不支持AspUpload组件"
'END IF
%>
#T= 取客户端语言环境
^!Request.ServerVariables("HTTP_ACCEPT_LANGUAGE")
#T= 取客户端信息:HTTP_USER_AGENT
^!Request.ServerVariables("HTTP_USER_AGENT")
#T= 取表单(Form)值元素值
Request.Form("^!")
#T= 取URL传递的值
Request.QueryString("^!")
#T= 取完整URL地址
Function GetUrl()
GetUrl="Microsoft.XMLHTTP")
With Retrieval
.Open Method, url, False ,"" ,""
.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
.Send(SendStr)
GetHttpPageContent = .ResponseBody
End With
SET Retrieval = Nothing
GetHttpPageContent=ByteToStr(GetHttpPageContent)
End Function
Function RegExpText(strng,regStr)
Dim regEx,Match,Matches,RetStr
SET regEx = New RegExp
regEx.Pattern = regStr
regEx.IgnoreCase = True
regEx.Global = True
SET Matches = regEx.Execute(strng)
For Each Match in Matches
RetStr = RetStr & regEx.Replace(Match.Value,"$1") & ","
Next
RegExpText = RetStr
set regEx=nothing
End Function
Function StreamBytesToBstr(strBody, CodeBase)
Dim objStream
SET objStream = Server.CreateObject("Adodb.Stream")
With objStream
.Type = 1
.Mode = 3
.Open
.Write strBody
.Position = 0
.Type = 2
.Charset = CodeBase
StreamBytesToBstr = .ReadText
.Close
End With
SET objStream = Nothing
End Function
%>