My Code for currecy converter using google finance is not working
$amount="10";
$from="USD";
$to="INR";
$data = file_get_contents("https://finance.google.com/bctzjpnsun/converter?a=$amount&from=$from&to=$to");
preg_match("/<span class=bld>(.*)<\/span>/",$data, $converted);
$converted = preg_replace("/[^0-9.]/", "", $converted[1]);
echo number_format(round($converted, 3),2); exit;
I am getting the result as 0.00.
Is there any alternative method other than this?