http://www.google.com/ig/calculator?hl=en&q=1USD=?TRY
Google ın döviz hesaplama hizmeti.
$adres = "http://www.google.com/ig/calculator?hl=en&q=1USD=?TRY"; $json = file_get_contents($adres); $para = json_decode($json,true); echo $para->rhs;Bu yöntem ile veriyi çekmeye çalışıyorum beceremedim nerde hata acaba?
--R10.NET; Flood Engellendi -->-> Yeni yazılan mesaj 22:00:55 -->-> Daha önceki mesaj 21:52:51 --
sorunu çözdüm arkadaşlar;
google json kodlarını
Alıntı
Alıntı
$forJSON = str_replace(array('lhs', 'rhs', 'error', 'icc'), array('"lhs"', '"rhs"', '"error"', '"icc"'), $json);ile çözüyorsunuz.yalnız benim anlamadığım bu json tanımlamaları sabit değil mi? google neyin kafasını yaşıyor?
http://php.net/manual/en/function.json-decode.php