Currency Converter
A currency converter udf.
This script allows you to convert between many currencies, using xe.com.
Usage
All you have to do is call a function, like this:
CConv($amount, $from, $to)
Parameters:
- $amount: the amount you wish to convert, i.e. 100
- $from: the currency you wish to convert from, e.g. EUR
- $to: The currency you wish to convert to, e.g. GBP
return values
0, @error is set to:
1: INet error.
Otherwise returns an array with the following values:
- 0: the converted result
- 1: 1 source currency in destination currency
- 2: 1 destination currency in source currency
- 3: Date of the last rates update, according to XE
Example included.