Проблем с rss

niksdevil

Registered
Ето го файла
Код:
<?php 
$db_user = "root"; // db username 
$db_pass = ""; // db password 
$db_host = "localhost"; // db host 
$db = ""; // db 
$adminmail = ""; // administrator e-mail 
$websitetitle = " - полудей с хората наоколо теб "; // title of your website 

$website = "http://sait.com/"; 
$rssdescr = "Скачай батка"; 
$year = "2011"; 

 header("Content-Type: application/xml; charset=windows-1251"); 
 
  $rss = '<?xml version="1.0" encoding="windows-1251" ?> 
           <rss version="2.0"> 
           <channel> 
<title> - Полудей с хората наоколо теб</title> 
<link>'.$website.'</link> 
<description>'.$rssdescr.'</description> 
<copyright>(c) '.$year.'  - Полудей с хората наоколо теб</copyright> 
<ttl>60</ttl> 
<language>bg-BG</language> 
<webMaster>'.$adminmail.'</webMaster> ';

mysql_connect($db_host,$db_user,$db_pass); 
mysql_select_db($db) or die( "Unable to select database"); 
$result = mysql_query ("SELECT * FROM users ORDER BY id DESC LIMIT 5") or die (mysql_error()); 
while ($row = mysql_fetch_array ($result)) { 

$rss.= "<item> <title>"; 
$rss.= "$row[username]"; 

$rss.= "</title>"; 

$rss.= "<link>"; 

$rss.= "$row[id]"; 

$rss.= "</link>"; 

$rss.= "<description><![CDATA[ "; 

$rss.= "$row[username]"; 

$rss.="]]></description>"; 


$rss.=" 
</item>"; 
} 
mysql_free_result ($result); 
$rss.='</channel> 
</rss>';
echo $rss;

Обаче за отговор получавам :
Код:
This page contains the following errors:

error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error.

Ето я базата данни :
Код:
CREATE TABLE `users` (
  `username` varchar(30) collate utf8_unicode_ci NOT NULL,
  `password` varchar(32) collate utf8_unicode_ci default NULL,
  `userid` varchar(32) collate utf8_unicode_ci default NULL,
  `userlevel` tinyint(1) unsigned NOT NULL,
  `email` varchar(50) collate utf8_unicode_ci default NULL,
  `timestamp` int(11) unsigned NOT NULL,
  `fname` varchar(25) collate utf8_unicode_ci NOT NULL,
  `lname` varchar(25) collate utf8_unicode_ci NOT NULL,
  `sex` varchar(1) collate utf8_unicode_ci NOT NULL,
  `pic` text collate utf8_unicode_ci NOT NULL,
  `city` varchar(50) collate utf8_unicode_ci NOT NULL,
  `points` int(11) NOT NULL,
  `sport` text collate utf8_unicode_ci NOT NULL,
  `movie` text collate utf8_unicode_ci NOT NULL,
  `smoke` text collate utf8_unicode_ci NOT NULL,
  `drink` text collate utf8_unicode_ci NOT NULL,
  `book` text collate utf8_unicode_ci NOT NULL,
  `eyes` text collate utf8_unicode_ci NOT NULL,
  `rast` text collate utf8_unicode_ci NOT NULL,
  `teglo` text collate utf8_unicode_ci NOT NULL,
  `music` text collate utf8_unicode_ci NOT NULL,
  `info` text collate utf8_unicode_ci NOT NULL,
  `day` text collate utf8_unicode_ci NOT NULL,
  `month` text collate utf8_unicode_ci NOT NULL,
  `year` text collate utf8_unicode_ci NOT NULL,
  `age` int(11) NOT NULL,
  `sms` int(11) NOT NULL,
  `av` text collate utf8_unicode_ci NOT NULL,
  `click` int(11) NOT NULL,
  PRIMARY KEY  (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 

Back
Горе