Google Currency Conversion…

Well, the api is pretty straight forward.  It was found in the Currency Conversion gadget from iGoogle by

Here is the example:

And the resposnse looks like this:
{lhs: “100 Euros”,rhs: “191.745037 British pounds”,display: “DISPLAY_FULL_PAGE”,error: “”,icc: true}

Heres how to do it in PHP

$amount = "100";

$from_Currency = "EUR";

$googleResponce = file_get_contents('' . $amount . $from_Currency . '%3D%3FGBP');

$googleResponce = explode(',', $googleResponce);

$numberInGBP = number_format(round(trim(str_ireplace(array('rhs: "', ' British pounds"'), '', $googleResponce[1])), 2), 2);

echo $numberInGBP;
Google Currency Conversion…