?currency= ?format=
Value
  1. AUD
  2. BRL
  3. CAD
  4. CHF
  5. CNY
  6. EUR
  7. GBP
  8. INR
  9. JPY
  10. MXN
  11. RUB
  12. USD
  13. ZAR
JSON
Description Extraction of Currency. Output in JSON.
Example
<?php






header
('Content-Type: text/plain');






$content file_get_contents('http://www.xmlcharts.com/cache/precious-metals.php?format=json');

if (
$content === false) die('Something went wrong.');






foreach (
json_decode($contenttrue) as $currency => $arr) {
    
    
    
    foreach (
$arr as $commodity => $price) {
        
        
        
        print 
$commodity.' in '.$currency.' per gram: '.round($price2).PHP_EOL;
        
        print 
$commodity.' in '.$currency.' per troy ounce: '.round($price 31.10347682).PHP_EOL.PHP_EOL;
        
        
        
    }
    
    
    
}






?>