This PHP script can be used to get real time stock and currency quotes from Yahoo Finance. The example posted will echo the value of $100 US in Canadian dollars.
variable can be currency or stocks. Lots of info can be gathered from this script such as, high/low of the day, open quotes, last trade, time of last trade, volume, etc. Yahoo Finance has all the symbols you need such as RHAT for Red Hat, AAPL for Apple, and all the currency symbols like CADUSD=X for US Dollar and Canadian dollar.
$us_price = '100';
$open = fopen("http://quote.yahoo.com/d/quotes.csv?s=$ticker&f=sl1d1t1c1ohgv&e=.csv", "r");
$exchange_rate = fread($open, 2000);
$exchange_rate = str_replace("\"", "", $exchange_rate);
$exchange_rate = explode(",", $exchange_rate);
$ca_price = ($us_price/$exchange_rate);
$price = number_format ($ca_price, 2);
echo "$us_price US dollars = \$$price Canadian dollars";