Source de rss.php pour ChuWiki

<?php

$maxItem 
10;

require(
dirname(__FILE__) . '/sdk/sdk.php');

$arrLastChanges GetLatestChangePageList();

$homepage "http://".$_SERVER["REDIRECT_SERVER_NAME"].substr($_SERVER["REDIRECT_REQUEST_URI"],0,strrpos($_SERVER["REDIRECT_REQUEST_URI"],"/")+1);

header("content-type: text/xml"); 

echo 
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo 
"<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"";
echo 
" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n";
echo 
"<rss version=\"0.91\">\n\n";
echo 
"<channel>\n";
echo 
"<title>"$k_aConfig["Title"] ."</title>\n";
echo 
"<link>"$homepage ."</link>\n";

$i=0;
foreach(
$arrLastChanges as $title => $timestamp)
{
    
$strDay substr($timestamp08);
    
$strTime substr($timestamp8);
    
$affTime substr($strDay04) . '-' substr($strDay42) . '-' substr($strDay62);
    
$affTime .= " ".substr($strTime02) . ':' substr($strTime22);
    echo 
"<item>\n";
    echo 
"<title>".$title." (".$affTime.")</title>\n";
    echo 
"<link>".$homepage."wiki".GetPageSeparator().$title."</link>\n";
    echo 
"</item>\n";

    
$i++;
    if(
$i>=$maxItem)
        break;
}

echo 
"</channel>\n";
echo 
"</rss>\n";

?>