- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
<?
$cont = file_get_contents("http://www.cbr.ru/scripts/XML_daily.asp");
$pattern = "/<CharCode>(.*?)<\/CharCode>\s*<Nominal>(.*)<\/Nominal>\s*<Name>(.*)<\/Name>\s*<Value>(.*)<\/Value>/im";
$cnt = preg_match_all($pattern,$cont,$matches);
if($cnt != FALSE)
{
$count_currencies = count($matches[1]);
for($i=0;$i<$count_currencies;$i++)
{
$curr_abbr = $matches[1][$i];
$curr_nominal = $matches[2][$i];
$curr_name = $matches[3][$i];
$curr_value = $matches[4][$i];
echo "$curr_abbr - $curr_nominal - $curr_name - $curr_value <br>";
} // for
} // if($cnt != FALSE)
?>
Драть таких троллей нужно ....
В попку? Шалунишка :D