if you plan on using data from yahoo stocks, they have a url which you pass parameters to and they return information on selected tickers.
for example.
http://finance.yahoo.com/d/quotes.csv?s=MSFT&f=snl1c6
the codes on the end have a meaning, unfortunately i cant remember the name of a good site that had them all mapped out.
otherwise using regular expressions [man]pcre[/man] you can extract data from a webpage with a given pattern.