Friday, June 20, 2008

Direct Streaming in ASP

You can use XMLHttp in ASP as well to create asynchronous requests.

<%
Dim msXHttp

Set msXHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
msXHttp.Open "GET", "http://www.google.com/", False
'msXHttp.Open "GET", " http://www.google.com/", False, Username, Password
msXHttp.send

If msXHttp.Status <> 200 Then
'Error
Response.Write ("Error")
Else
Dim downloadedData
downloadedData = msXHttp.responseText
Response.Write("Result : "+downloadedData)
End If

%>

No comments: