function rssoku()
{
$feed=file_get_contents("http://localhost/syndication.php");
$xml= new SimpleXMLElement($feed);
$sayac="1";
$limit="4";
echo "";
foreach ($xml -> channel -> item as $veri){
if ($sayac <= $limit){
$link = $veri -> link;
$title= $veri -> title;
$title = mb_convert_encoding($title, "UTF-8", "ISO-8859-9");
$length = strlen($title);
if($length > 44)
{
$new = substr($title,0,44);
$title = $new."...";
}
echo "- $title";
}
$sayac++;
}
echo "
";
}
rssoku();
?>