I'm using the "new" google currency calculator, and instead of the precedent version, now we have a form, with dropdown menus..etc, what i need is just to get the result value.
This is my simple php function :
// GOOGLE CURRENCY CONVERTER API
function converter_currency($amount, $from){
$result = file_get_contents('https://www.google.com/finance/converter?a='.$amount.'&from='.$from.'&to=USD');
print_r ($result);
// echo gettype($result); <== said that it's a string
}
converter_currency(5, 'EUR'); //converts 5euros to USD
That returns a form ..ect with the result : 5 EUR = 5.4050 USD
How to get only : 5.4050
?
Thank you.