日期:2014-05-16 浏览次数:20924 次
Function PostHttpPage(PostUrl,PostData)
Dim xmlHttp
Dim RetStr
Set xmlHttp = CreateObject("Msxml2.ServerXMLHTTP")
xmlHttp.setTimeouts 30000,30000,30000,60000
'On Error Resume Next
xmlHttp.Open "POST", PostUrl, true
XmlHTTP.setRequestHeader "Content-Length", Len(PostData)
xmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"
xmlHttp.Send PostData
If Err.Number <> 0 Then
Set xmlHttp=Nothing
PostHttpPage = "$False$"
Exit Function
End If
PostHttpPage= "$False$"
Set xmlHttp = nothing
End Function
Dim xmlServerHttp
set xmlserverhttp = server.createobject("MSXML2.ServerXMLHTTP")
xmlServerHttp.open "GET", "http://localhost/receiver.asp", true
xmlServerHttp.send
While xmlServerHttp.readyState <> 4
xmlServerHttp.waitForResponse 1000
Wend
response.contenttype = "text/html"
response.write "Receiver Page: " & xmlServerHttp.responseText & "<br/>"