Show the current value of Dollar in Rupees

This Script Show the current value of rupees in dollar.It is work on google API, the url of the google API calculater is
http://www.google.com/ig/calculator?hl=en&q=1USD=?INR

Via this URL you can convert all the currency into another currency

Now this is the Full script of retrieving the current value of the dollar in rupees
$s = file_get_contents("http://www.google.com/ig/calculator?hl=en&q=1USD=?INR");
$s=explode('{lhs: "1 U.S. dollar",rhs: "',$s);
$s=explode('Indian rupees",error: "",icc: true}',$s[1]);
$s=(FLOAT)$s[0];
echo "1 USD = ".round($s,2)." INR"
?>

Share This Post

Post Comment