checkupdata.asp

来自「自由领域Flash Asp大头贴接口版(TFOT Photo) v1.0 .ra」· ASP 代码 · 共 67 行

ASP
67
字号
<%
On Error Resume Next
Server.ScriptTimeOut=9999999
Function getHTTPPage(Path,stra)
t = GetBody(Path,stra)
getHTTPPage=BytesToBstr(t,"UTF-8")
End function
Function GetBody(url,stra) 
on error resume next
Set Retrieval = CreateObject("Microsoft.XMLHTTP") 
With Retrieval 
.Open "get", url, False, "", "" 
.setRequestHeader "Content-Length",Len(strA)
.setRequestHeader "CONTENT-TYPE","application/x-www-form-urlencoded"

.Send stra
GetBody = .ResponseBody
End With 
Set Retrieval = Nothing 
End Function
Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText 
objstream.Close
set objstream = nothing
End Function
Function Newstring(wstr,strng)
Newstring=Instr(lcase(wstr),lcase(strng))
if Newstring<=0 then Newstring=Len(wstr)
End Function
Function URLEncoding(vstrIn)
strReturn = ""
For i = 1 To Len(vstrIn)
ThisChr = Mid(vStrIn,i,1)
If Abs(Asc(ThisChr)) < &HFF Then
strReturn = strReturn & ThisChr
Else
innerCode = Asc(ThisChr)
If innerCode < 0 Then
innerCode = innerCode + &H10000
End If
Hight8 = (innerCode And &HFF00)\ &HFF
Low8 = innerCode And &HFF
strReturn = strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8)
End If
Next
URLEncoding = strReturn
end function

strUrl="http://www.tfot.net/updata/tp/tpiupdata.asp?ver=1.0"
wstr=gethttppage(strurl,"UTF-8")



response.write(wstr)

%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?