PHP Currency Converter

To convert the currency using the 3rd party API. Used "http://www.google.com/ig/calculator?hl=en&q=from=?To

For example to convert 1 USD to INR:
http://www.google.com/ig/calculator?hl=en&q=1USD=?INR

The below functions take input and passed API and parse it.

public function SingleConversion($inputCurrency,$toCurrency)
{
$curAmt=explode(' ',$inputCurrency);
$inputCur = $curAmt[0];
$inputAmt = $curAmt[1];
$string = $inputAmt.$inputCur."=?".$toCurrency;
$converter = "http://www.google.com/ig/calculator?hl=en&q=".$string;
$this->getAPIRates($converter);
}
public function getAPIRates($url)
{
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT , "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$result = curl_exec($ch);
curl_close($ch);

$result = explode('"', $result);
$from = explode(' ', $result[1]);
$to = explode(' ', $result[3]);
echo $to;
}