次のコード (以下) があり、iGoogle バージョンを使用していました。
$url = 'http://www.google.com/ig/calculator?hl=en&q=' . $amount . $from_Currency . '=?' . $to_Currency;
$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);
$rawdata = curl_exec($ch);
curl_close($ch);
$data = explode('"', $rawdata);
$data = explode(' ', $data[3]);
$var = $data[0];
しかし、別の URL を使用しているように見えます。
'http://www.google.com/finance/converter?hl=en&a=' . $amount . '&from=' . $from_Currency . '&to=USD';
しかし、単に URL を変更しただけでは、慣れ親しんだ必要な結果が返されません。
今私が得るすべては
http://www.w3.org/TR/html4/strict.dtd
SO には、この最新の通貨コンバーターの URL に取り組んだ人や、アイデアがある人がいます。または、PHP を使用した代替