function stock_ticker ($symbols, $background_color, $stock_color, $price_color, $up_color, $down_color, $speed
{
sort$symbols);
if ($background_color==$stock_color) {
// something's wrong, colors weren't specified
$background_color = invert_color$background_color);
}
$return = '<div align="center">
<marquee bgcolor="#'$background_color'" loop="20" scrollamount="'$speed'">'
foreach ($symbols as $symbol) {
$data = file_get_contents"http://quote.yahoo.com/d/quotes.csv?s=$symbol&f=sl1d1t1c1ohgv&e=.csv");
$values = explode",", $data);
$lasttrade = $values[1];
$change = $values[4];
$return .= "<span style="color:#$stock_color">$symbol</span> "
$return .= "<span style="color:#$price_color">$lasttrade</span> "
if ($change<0)
$return .= "<span style="color:#$down_color">$change</span> "
else
$return .= "<span style="color:#$up_color">$change</span> "
$return .= " "
}
$return .= '</marque>
</div>'
return $return
}