Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Liviu  >  BNR official rates  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example of how to use
Class: BNR official rates
Get currency exchange rates from BNR
Author: By
Last change:
Date: 6 years ago
Size: 472 bytes
 

Contents

Class file image Download
<?php

require_once 'bnr.php';

$bnr = new Bnr;

/**
 * Get all available currencies
 */
echo '<pre>';
print_r($bnr->getCurrencies());
echo 
'<pre>';

echo 
'<hr />';

/**
 * Get a currency value
 */
echo $bnr->getCurrencyValue('USD');

echo 
'<hr />';

/**
 * Get a currency full name
 */
echo $bnr->getCurrencyName('USD');

echo 
'<hr />';

/**
 * Get all currencies names
 */
echo '<pre>';
print_r($bnr->getCurrencyName());
echo 
'<pre>';