



<?php
//pro php5
$url="http://blassenweb.net/rss-20.xml";
$xml=simplexml_load_file($url);
$index = 1;


foreach ($xml->channel->item as $item){
if($index > 3){ break; }
$index++;
$date = $item->pubDate;
$link = $item->link;
$title = $item->title;
$desc =$item->description;
$cat = $item->category;


$date = strtotime($date);
$date = StrFTime("%d. %m. %Y", $date);
$date = str_replace(". 0", ". ", $date);
$num = strlen($date);
if(substr($date, 0, 1) == "0") $date = substr($date, 1, $num);




echo $date." - <a href=\"".$link."\">".$title."</a>";
echo "<br />".$desc."<br /><br />";
}


?>




if (file_exists("atom.xml") && is_writable("atom.xml")) {
$file5 = fopen("atom.xml", "w");
fwrite($file5, $string);
fclose($file5);
}




<?php


$bwname = "BLASSENweb - the future of your web !";
$rsssource = "http://blassenweb.net/rss-20.xml";
$homelink = "http://blassenweb.net/";


/**************************************
2005+, (c) Blassen
http://blassenweb.net
***************************************/
echo "<!--\n\n\n\n\n


\\|//// 
\ _ _ // 
( o o ) 
+===============oOOo-(_)-oOOo===========+ 
http://blassenweb.net 
+=======================Oooo============+ 
oooO ( ) 
( ) ) / 
\ ( (_/ 
\_) 
\n\n\n\n\n-->";


$obsah = "";
$data = @implode ("", file ($rsssource));
preg_match_all("|<item>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);
If (count($items[1])==0) {
preg_match_all("|<item .*>(.*)</item>|Uism",$data, $items, PREG_PATTERN_ORDER);}
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$obsah .="<a href=\"".$regs[3][0]."\" title=\"".$regs[1][0]."\" target=\"_blassen_\">".$regs[1][0]."</a><br />\n";
}


$utf8 = iconv("UTF-8", "ISO-8859-2", $obsah); // UTF-8 => ISO-8859-2
$win1250 = iconv("CP1250", "ISO-8859-2", $obsah); // CP1250 (WINDOWS-1250) => ISO-8859-2



echo $utf8;// <- změny kódování a obsah se zobrazí tu
echo "<a href=\"".$homelink."\" target=\"_blassen_\">více ...</a>\n";


?>






<?php
//pro php5
$url="http://blassenweb.net/rss-20.xml";
$xml=simplexml_load_file($url);
$index = 1;


foreach ($xml->channel->item as $item){
if($index > 3){ break; }
$index++;
$date = $item->pubDate;
$link = $item->link;
$title = $item->title;
$desc =$item->description;
$cat = $item->category;


$date = strtotime($date);
$date = StrFTime("%d. %m. %Y", $date);
$date = str_replace(". 0", ". ", $date);
$num = strlen($date);
if(substr($date, 0, 1) == "0") $date = substr($date, 1, $num);




echo $date." - <a href=\"".$link."\">".$title."</a>";
echo "<br />".$desc."<br /><br />";
}


?>



<?php

if (stristr($_SERVER['SCRIPT_NAME'], basename(__FILE__)) OR !defined('UN_KERNELFILES_LOADED')) {
Header("Location: ../index.php");
die();
}
$content = "<br>";





$content = "<p align=\"center\"><font size=\"7\">rss</font></p> ";


$xml=simplexml_load_file($root."mojarss");
$index = 1;


foreach ($xml->channel->item as $item){
if($index > 3){ break; }
$index++;
$date = $item->pubDate;
$link = $item->link;
$title = $item->title;
$desc =$item->description;
$cat = $item->category;


$date = strtotime($date);
$date = StrFTime("%d. %m. %Y", $date);
$date = str_replace(". 0", ". ", $date);
$num = strlen($date);
if(substr($date, 0, 1) == "0") $date = substr($date, 1, $num);




echo $date." - <a href=\"".$link."\">".$title."</a>";
echo "<br />".$desc."<br /><br />";
}
echo "<a href=\"".$link."\">".$title."</a>";
echo "<br />".$desc."<br /><br />";








?>











<?php
if (stristr($_SERVER['SCRIPT_NAME'], basename(__FILE__)) OR !defined('UN_KERNELFILES_LOADED')) {
Header("Location: ../index.php");
die();
}






$content = "";




$xml=simplexml_load_file($link."http://www.ruzombercan.sk/liptov/index.php?format=feed&type=rss");

$index = 1;


foreach ($xml->channel->item as $item)


{
if($index > 3){ break; }
$index++;



$title = iconv('UTF-8', 'ISO-8859-2',$item->title);

$date = $item->pubDate;
$link = $item->link;


$desc = iconv('UTF-8', 'ISO-8859-2',$item->description);


$cat = $item->category;


$date = strtotime($date);
$date = StrFTime("%d. %m. ", $date);
$date = str_replace(". 0", ". ", $date);
$num = strlen($date);
if(substr($date, 0, 1) == "0") $date = substr($date, 1, $num);






echo "'<b>'<a href=\"".$link."\">".$title."</a>'</b>'";
echo "<br />".$desc. "<br />";


}
$content = "<br>"; 




?>




Obsah fóra BLASSENweb » Rady a porady - ostatní
![]() |
|