An extremely simple way of doing this would be to use a freely available API such as appspot's rateexchange: http://rate-exchange.appspot.com/currency?from=USD&to=EGP&q=10
Where from= the source currency, to= the target currency, and q= the amount of source currency.
You could then easily use PHP's cURL to GET the resulting JSON, and use json_decode
to convert it into usable PHP.
Example:
function get($url)
{
$ch = curl_init ($url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
return curl_exec ($ch);
}
$json = get("http://rate-exchange.appspot.com/currency?from=USD&to=EUR&q=10");
$array = json_decode($json, true);
print_r($array);