Log In Register
c
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 . '&currency_in=' . $fromCurrency . '&currency_out=' . $toCurrency));

if (@$data->success !== 1)
{
    die('Failed');
}
echo $data->amount . ' ' . $data->currency_out;