Listing 27.10. Skrypt ustal-adresy.php
<?php

set_time_limit(0);

$adresy = '';

$rss = simplexml_load_file('http://rss.nbp.pl/kursy/TabelaA.xml');

foreach ($rss->channel->item as $i) {
    $tmp = $i->enclosure->attributes();
    $url = $tmp->url[0];
    $adresy .= $url . "\r\n";
}
file_put_contents('adresy.txt', trim($adresy));
