Skip to content

Instantly share code, notes, and snippets.

@ziyaddin
Last active January 28, 2017 13:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ziyaddin/8754655 to your computer and use it in GitHub Desktop.
Save ziyaddin/8754655 to your computer and use it in GitHub Desktop.
Parse Cbar.az currencies with PHP
<?php
$date = date ("d.m.Y");
$url = simplexml_load_file("http://cbar.az/currencies/" .$date.".xml");
echo $url->ValType[0]->Valute[2]->Nominal;
echo $url->ValType[0]->Valute[2]->Name;
echo $url->ValType[0]->Valute[2]->Value ."<br />";
echo $url->ValType[0]->Valute[34]->Nominal;
echo $url->ValType[0]->Valute[34]->Name;
echo $url->ValType[0]->Valute[34]->Value ."<br />";
//go with this logic...
?>
@ziyaddin
Copy link
Author

ziyaddin commented Feb 1, 2014

Code is written by Kamran Nadjafzadeh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment