- 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)
?>
nobody 20.04.2011 12:45 # 0
JeremyW 20.04.2011 13:51 # −7
JeremyW 20.04.2011 13:52 # −7
JeremyW 20.04.2011 13:52 # −7
Vindicar 20.04.2011 19:45 # −1
JeremyW 20.04.2011 19:57 # −6
JeremyW 20.04.2011 19:56 # −12
guest 20.04.2011 13:22 # 0
Vasiliy 20.04.2011 14:05 # +1
rO_ot 20.04.2011 16:10 # 0
Lure Of Chaos 21.04.2011 10:13 # 0
Uhehesh 10.08.2014 13:38 # +2
Int 20.04.2011 18:17 # 0
nobody 20.04.2011 20:07 # +1
Int 21.04.2011 18:03 # 0
RaZeR 20.04.2011 21:45 # +6
guest 21.04.2011 10:07 # +1
Драть таких троллей нужно ....
guest 21.04.2011 10:09 # −2
В попку? Шалунишка :D
guest 21.04.2011 18:19 # 0
Govnocoder#0xFF 21.04.2011 18:21 # 0
eth0 21.04.2011 11:46 # +1
Govnocoder#0xFF 21.04.2011 18:12 # 0