I wrote an article on just this very topic in last month's Universal Thread magazine. Here is a small piece of the code that is part of the article and should get you started...
loXmlHttp = NEWOBJECT( "Microsoft.XMLHTTP" )
lcURL = "http://finance.yahoo.com/d/quotes.csv"
loXmlHttp.open( "POST" , lcURL, .F. )
loXmlHttp.send( "s=MSFT,^DJI&f=sl1d1t1c1ohgv&e=.csv" )
IF loXmlHttp.STATUS != 200
lcMessage = TEXTMERGE( ;
"An error occurred - status = <<loXmlHttp.STATUS>><<loXmlHttp.statustext>>" )
MESSAGEBOX( lcMessage, 16, PROGRAM() )
EXIT
ENDIF
lcFile = SYS( 2015 )
STRTOFILE( loXmlHttp.responsetext, lcFile )
>Perhaps someone can point me in the right correction.
>
>I need to be able to pull in "end of day USA stock market data" into a form. I need the closing numbers on the S&P, NAZ, and also the DOW. I would also like Volume if possible as well.
>
>I know this info is available in places like Yahoo, Quote.com, etc. Anyone know where and how to grab this data.
>
>If it helps, I do have and pay for "live market feed" from both TradeStation and also Quote.com (Qcharts). However, I don't have a clue how to access these live feeds within a VFP app - and that is probably overkill anyway, as I just need end of day data.
>
>Mel Cummings