Currency converter in PHP, eg. EUR to USD - rest7/api GitHub Wiki
Converting money from one currency to nother in PHP using free API:
<?php
$amount = '123.45';
$fromCurrency = 'EUR';
$toCurrency = 'USD';
$data = json_decode(file_get_contents('http://api.rest7.com/v1/currency_convert.php?amount=' . $amount . '¤cy_in=' . $fromCurrency . '¤cy_out=' . $toCurrency));
if (@$data->success !== 1)
{
die('Failed');
}
echo $data->amount . ' ' . $data->currency_out;