This uses the microsoft XMLHTTP component this time to get the the chart for a particular stock .Change the msft part of strURL ="http://finance.yahoo.com/q?s=msft&d=c&k=c4" to a different stock symbol to display a different chart .
Code
<%
Dim objXML
'create an instance of the XMLHTTP
component
Set objXML = Server.CreateObject("Microsoft.XMLHTTP")
strURL ="http://finance.yahoo.com/q?s=msft&d=c&k=c4"
'get the strURL
objXML.Open "GET" , strURL
, False ,"",""
'send the information
objXML.Send
'if we have no errors
If Err.Number = 0 Then
'and the url is valid
If objXML.Status = 200 then
strOpen = objXML.ResponseText
'this is the start point on the page
that we want
startPoint= InStr( strOpen, "<big>Chart:
</big>" )
'and this is the end point on the
page
endPoint = InStr( startPoint, strOpen,
"Add to My Portfolio</a>")
'store all of the rest in the variable
strYahoo
strYahoo = Mid( strOpen, startPoint,
endPoint-startPoint )
'display the part of the page we want
response.Write strYahoo
Else
'bad url display a message
Response.Write "Incorrect URL"
End if
Else
'if we do have an error display the
description of the error
Response.Write Err.Description
End If
'clear up
Set objXML = Nothing
%>