func.asp

来自「获取远程接口程序」· ASP 代码 · 共 37 行

ASP
37 行
字号
<%   
Function SendToSp(PostUrl)
       		Server.ScriptTimeOut=72000
       
	    	Set oXMLHttp = createObject("Microsoft.XMLHTTP")
		Call oXMLHttp.Open("get", PostUrl, false)
		Call oXMLHttp.Send("")
		sHtmlStr =  oXMLHttp.responseBody 
		Set oXMLHttp = nothing 
		
		SendToSp=sHtmlStr
End Function 

Function Bytes2bStr(p_sHtmlStr)
	dim sReturnStr
	dim i,n
	sReturnStr = ""
	n = LenB(p_sHtmlStr)
	
	For i = 1 To n
		dim sCharCode
		dim sNextCharCode
		sCharCode = AscB( MidB(p_sHtmlStr, i, 1) )
		
		If (sCharCode < &H80) Then
			sReturnStr = sReturnStr & Chr(sCharCode)
		Else
			sNextCharCode = AscB( MidB(p_sHtmlStr, i+1, 1) )
			sReturnStr = sReturnStr & Chr(CLng(sCharCode) * &H100 + CInt(sNextCharCode))
			i = i + 1
		End If
	Next
	
	Bytes2bStr = sReturnStr
End Function
%>

⌨️ 快捷键说明

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