Anasayfa / Etiket Arşivi: PHP DÖVİZ KURLARI KODU

Etiket Arşivi: PHP DÖVİZ KURLARI KODU

PHP DÖVİZ KURLARI KODU

  $content = file_get_contents(“http://www.tcmb.gov.tr/kurlar/today.xml”); foreach($currency as $code => $arr){ preg_match(“‘<currency Kod=\”(“.$code.”)\”.*>(.*)</currency>’Uis”,$content,$crst); foreach($convert as $field => $value){ preg_match(“‘<“.$field.”>(.*)</”.$field.”>’Uis”,$crst[2],$frst); $currency[$code][$value] = $frst[1]; } }   $sen=”<pre>”.print_r($currency,true).”</pre>”; $sen1=str_replace(‘(‘,”,$sen); $sen2=str_replace(‘)’,”,$sen1); $sen3=str_replace(‘Array’,”,$sen2); $sen4=str_replace(‘[USD] =>’,”,$sen3); $sen5=str_replace(‘[EUR] =>’,”,$sen4); $sen6=str_replace(‘ ‘,”,$sen5); $sen7=str_replace(‘<pre>’,”,$sen6); $sen8=str_replace(‘</pre>’,”,$sen7); $sen9=str_replace(‘[İsim]=>’,”,$sen8); $sen10=str_replace(‘AMERİKANDOLARI’,'<tr><td rowspan=2 bgcolor=f0f0f0><font size=2>USD</font></td><td ...

Devamını Oku »