Just spotted this while "shopping" for scripts. Don't know if it works, but it might be worth your while to look. Give you a place to start anyway
Get Stock Quote's - joeaic
This little script will grab stock quote info from finance.yahoo.com. The script is kind of crude. Something I wrote while learning php.
Here's one more. Best of luck.....
Stock Information Retrieval (c.ticker.php) jmp1024
This class will retrieve information from Yahoo's finance site and put it into a nice, usable, class variable for you to use elsewhere at your leisure. Example usage is in the class comments.