-
-
Save CubexX/714493e9b0ab64196454 to your computer and use it in GitHub Desktop.
php cbr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getValute() { | |
$res = file_get_contents("http://www.cbr.ru/scripts/XML_daily.asp"); | |
$values = new SimpleXMLElement($res); | |
$data = array(); | |
$data["dollar"] = $values->Valute[9]->Value; | |
$data["euro"] = $values->Valute[10]->Value; | |
return $data; | |
} | |
$valutes = getValute(); | |
echo $valutes["dollar"]; | |
echo $valutes["euro"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment