here is how i did it to get the stock price for an intranet site.
<?php
$furl=fopen("http://quotes.nasdaq.com/quote.dll?page=xml&mode=stock&symbol=SSTI",'r');
$stock_info = stripslashes(fread($furl,200000));
eregi("<todays-high-price>(.*)</todays-high-price>",$stock_info,$todays_high_price);
eregi("<todays-low-price>(.*)</todays-low-price>",$stock_info,$todays_low_price);
eregi("<last-sale-price>(.*)</last-sale-price>",$stock_info,$last_sale_price);
eregi("<net-change-price>(.*)</net-change-price>",$stock_info,$net_change_price);
eregi("<share-volume-qty>(.*)</share-volume-qty>",$stock_info,$share_volume_qty);
if($todays_high_price[1] != "") {
$stock_file = fopen('./stock_info.xhtml', 'w');
fwrite($stock_file, "last: ".$last_sale_price[1]." ");
if(substr($net_change_price[1], 0, 1) == "-") {
fwrite($stock_file, "<font color='red'>");
} else {
fwrite($stock_file, "<font color='green'>+");
}
fwrite($stock_file, $net_change_price[1]."</font> ");
fwrite($stock_file, "high: ".$todays_high_price[1]." low: ".$todays_low_price[1]." vol: ".$share_volume_qty[1]);
}
echo "done\n";
?>