Ps. uzyłem juz opcji "szukaj"
<?php $content = "Kurs średni wg NBP<br>z dnia $zdnia[1] "; for ($i=0; $i<count($sa[0]); $i++) { } ?>
<?php $content = "Kurs średni wg NBP<br>z dnia $zdnia[1] "; for ($i=0; $i<count($sa[0]); $i++) { } ?>
<?php function convert($text) { $charset = ''; if ($charset && function_exists('iconv')) { return iconv('utf-8', $charset, $text); } elseif ($charset && function_exists('recode_string')) { return recode_string('utf8...' . $charset, $text); } else { return $text; } } class kursy { private $contents = ''; function __construct($url, $cache = 'kursy_cache.txt', $lastupdate = '12:16 -1 day', $thisupdate = '12:16') { $recent = TRUE; $cache = ''; } else { $recent = FALSE; $recent = FALSE; } } if ($cache == '' OR ! $recent) { if ($this->contents == FALSE) { throw new Exception('Nie udało się pobrać kursów walut.'); } if ($cache != '') { file_put_contents($cache, $this->contents); } } else { } } function znajdz($fields) { } $last = libxml_use_internal_errors(TRUE); $info = new SimpleXMLElement($this->contents); libxml_use_internal_errors($last); 'numer_tabeli' => (string) $info->numer_tabeli, 'data_publikacji' => (string) $info->data_publikacji ); foreach ($info->pozycja as $v) { $kod = (string) $v->kod_waluty; 'nazwa' => convert((string) $v->nazwa_waluty), 'ilosc' => (string) $v->przelicznik ); foreach ($fields as $field) { $rates[$kod][$field] = (string) $v->$field; }; } return $rates; } } try { $kursy = new kursy('http://nbp.pl/kursy/xml/LastA.xml', 'kursy_cache.txt', '12:16 -1 day', '12:16'); $somecontent = $waluta['BGN']['ilosc'] . ' BGN: ' . $waluta['BGN']['kurs_sredni'] . '<br /> ' . $waluta['CLP']['ilosc'] . ' CLP: ' . $waluta['CLP']['kurs_sredni'] . '<br /> ' . $waluta['INR']['ilosc'] . ' INR: ' . $waluta['INR']['kurs_sredni'] . ' '; exit; } exit; } } else { } } catch (Exception $e) { } ?>
} catch (Exception $e) { }