<?php
header("Content-Type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";
echo "<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\"\n";
echo " \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n\n";
echo "<rss version=\"0.91\">\n\n";
echo "<channel>\n";
mysql_connect("", "", "") or die("Ei saa ühendust andmebaasiga: ".mysql_error());
mysql_select_db("") or die("Ei saa valida andmebaasi: ".mysql_error());
$query2 = mysql_query("SELECT * FROM settings");
$row = mysql_fetch_array($query2);
$title = $row['title'];
$news = $row['news'];
$query = mysql_query("SELECT * FROM news ORDER BY id LIMIT $news");
echo "<title>$title</title>\n";
echo "<link>http://sparta.et-resources.com</link>\n";
echo "<description>#Sparta.et News</description>\n";
while($row2 = mysql_fetch_array($query)){
$title = $row['title'];
$story = $row2['story'];
echo "<item>\n";
echo "<title>".$title."</title>\n";
echo "<link></link>";
echo "<description>".$story."</description>\n";
echo "</item>\n\n";
}
echo "</channel>\n";
echo "</rss>";
?>
this $title and $story really.. work.. but in this rss feed it don't show anything.. i dunno why..
#Sparta.et
check it yourself


Sign In
Create Account

Guest_Jaan_*
Back to top









