A smple rss for Kroax , code taken from hobbyman site and modified
Code<?php
header("Content-Type: text/xml");
require_once "maincore.php";
require_once THEME."theme.php";
include BASEDIR."infusion/the_korax/infusion_db.php";
$result3 = dbquery("SELECT kroax_id,kroax_titel,kroax_date FROM ".$db_prefix."kroax WHERE ".groupaccess('kroax_access')." AND kroax_approval='' ORDER BY kroax_id DESC LIMIT 0,10");
$result2=dbquery("SELECT siteurl FROM ".DB_SETTINGS);
$base=dbresult($result2,0);
echo "<?xml version=\"1.0\" encoding=\"".$locale['charset']."\"?>\n\n
<rss version=\"0.91\">\n\n
<channel>\n
<title>".$settings['sitename']." - Latest Videos</title>\n
<link>".$base."</link>\n
<image><url>".$base."images/rss.jpg</url></image>\n
<description>".$settings['description']."</description>\n";
echo "RSS _Downloads. Not available at this time. Please try again later.\n";
while ($row=dbarray($result3)) {
$rsid = intval($row['kroax_id']);
$rtitle = $row['kroax_titel'];
$description =$row['kroax_description'];
$description = stripslashes(nl2br($row['Kroax_description']));
// Add allowable HTML tags below, all others will be stripped
$description = strip_tags($description, "<A><P><BR><BR /><HR>");
echo "<item>\n
<title>".htmlspecialchars($rtitle)."</title>\n
<link>".$base."infusions/the_kroax/embed.php?url=".$rsid."</link>\n
<description>".trimlink(htmlspecialchars($description),400)."</description>\n
</item>\n\n";
}
echo "</channel>
</rss>";
?>
Upload rss.jpg into image folder
@domi---If u find anything wrong plz correct it
|