Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

Make money selling software. Check this out here

Hosted clickbank mall. Check this out here




   Misc

   Amazon

   Links

    


Yahoo stock chart

 

 

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
%>

 

 

 

 

 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
multi status bar messages(Javascript)
Blinking text(C)
download a file from the internet(VB)
Display meta tags(PHP)
Open display properties background(VB)
vertical scrolling text(Blitzbasic)
Ban a user based on IP address(ASP)
move a file to the recycle bin(VB)

    




Copyright © 2003 by programmershelp.co.uk