Jump to content

What is wrong with my RSS feed ?


Suchy

Recommended Posts

Yeah what is wrong with this?

 

filename: rss.php

<?php 
include ("connect.php");

$query = "SELECT * FROM _____ ORDER BY ____ DESC";
$result = mysql_query($query);
$new = getRows($result);

header("Content-type: text/xml");
?>

<rss version="2.0">
<channel>
   <title>New items</title>
   <link>http://www.mywebsite.com/rss.php</link>
   <description>New items uploaded by users</description>
   
   <?php foreach($new as $i){ ?>        
   <item>
      <title><?= $i['_____'] ?></title>
  <description><?= $i['_____'] ?></description>
  <author><?= $i['_____'] ?></author>
  <link><?= "http://www.mywebsite.com/new.php?item=" . $i['_____'] ?></link>
  <pubDate><?= $i['_____'] ?></pubDate>
   </item>
   <?php } ?>
      
</channel>
</rss>

 

In IE 7 I get:

This feed contains code errors.

 

But in Firefox it works, except for foreign characters such as ż, ł or ó little question mark inside a dimond box is displayed.

Link to comment
https://forums.phpfreaks.com/topic/108787-what-is-wrong-with-my-rss-feed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.