BlackHalt writeln (by me or from manual) PHP source Codes ...

Saglābt TVemT

<?php
#Saglābt TVemT
$direktorija='dati/';
$fails=file_get_contents('http://www.tvnet.lv/rss/zinas_latest.xml');
preg_match_all("#<guid isPermaLink=\"true\">(.*?)(\d*)<\/guid>#s",$fails,$gudribas);
$cik=count($gudribas[2]);
for(
$i=0;$i<$cik;$i++){
$filtrs=$gudribas[2][$i];
$glabt=file_get_contents("http://www.tvnet.lv/zinas/printArticle.php?id=$filtrs");
$atver=fopen("$direktorija/$filtrs.html",'w+');
fwrite($atver,$glabt);
fclose($atver); 
echo
"<a href=\"$direktorija/$filtrs.html\">$filtrs<br />\n";
}
?>