- Dim xmlHttp
- set xmlHttp = server.createobject("MSXML2.ServerXMLHTTP")
- xmlHttp.open "GET", "http://localhost/receiver.asp", true
- xmlHttp.send
- response.contenttype = "text/html"
- response.write "Receiver: " & xmlHttp.responseText
以上代码,除非receiver.asp速度非常快,否则一般接收不到xmlHttp.responseText,这样可不行,得想办法,所以有了以下代码:
- Dim xmlHttp
- set xmlHttp = server.createobject("MSXML2.ServerXMLHTTP")
- xmlHttp.open "GET", "http://localhost/receiver.asp", true
- xmlHttp.send
- While xmlHttp.readyState <> 4
- xmlHttp.waitForResponse 1000
- Wend
- response.contenttype = "text/html"
- response.write "Receiver: " & xmlHttp.responseText
至此,最终能正常返回xmlHttp.responseText
联系客服