can anybody tell me how can i get response from remote server. I am having problem in getting response from remote server for that I have written following script.
But its not showing values in the teble.
But its not showing values in the teble.
Code:
<%
Response.Write("<SPAN class='tt'>Corn Futures (CZ)</SPAN>")
Const REMOTE_FILE_URL="http://www.cmegroup.com/trading/commodities/grain-and-oilseed/corn_quotes_globex.html"
Call ShowRemoteFile
Sub ShowRemoteFile
Dim objXML, strContents, arrLines
Dim x
Set objXML=Server.CreateObject("Microsoft.XMLHTTP")
'read text file...
objXML.Open "GET", REMOTE_FILE_URL, False
objXML.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objXML.Send
strContents=objXML.ResponseText
Set objXML=Nothing
'split into lines and read line by line...
arrLines=Split(strContents, VBCrLf)
For x=0 To UBound(arrLines)
If InStr(arrLines(x), "<Table>") or InStr(arrLines(x), "<th") or InStr(arrLines(x), "<tr") Then
If not InStr(arrLines(x),"<i>") Then
'If InStr(arrLines(x), "<Table>") or InStr(arrLines(x), "<tr>") or InStr(arrLines(x), "<td>") or InStr(arrLines(x), "xmlns:xs") Then
Response.Write(arrLines(x)&"<br />")
'End If
End If
End If
Next
End Sub
%>
Comment