$xml= simplexml_load_file('http://www.tcmb.gov.tr/kurlar/today.xml');
foreach ($xml->Currency as $Currency) {
// USD ALIŞ-SATIŞ
if ($Currency['Kod']=="USD") {$usd_DS=$Currency->BanknoteSelling; $usd_DA=$Currency->BanknoteBuying; }
// EURO ALIŞ-SATIŞ
if ($Currency['Kod']=="EUR") {$eur_DS=$Currency->BanknoteSelling; $eur_DA=$Currency->BanknoteBuying; }
// USD EFEKTİF ALIŞ-SATIŞ
if ($Currency['Kod']=="USD") {$usd_ES=$Currency->ForexSelling; $usd_EA=$Currency->ForexBuying; }
// EURO EFEKTİF ALIŞ-SATIŞ
if ($Currency['Kod']=="EUR") {$eur_ES=$Currency->ForexSelling; $eur_EA=$Currency->ForexBuying; }
}
?>
Kaynak
DEMO