Sorry

This feed does not validate.

In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendation.

Source: http://www.komunikatory.pl/rss/newsy

  1. <?php
  2.  
  3. require_once("lib.feed.php");
  4. require_once("lib.converter.php");
  5. @require_once("../forum/config.php");
  6.  
  7. $rss = new UniversalFeedCreator();
  8. //header("Content-Type: application/xml+rss");
  9. //$rss->useCached("RSS2.0", "cache/rss-newsy.xml");
  10. $rss->title = "Komunikatory.pl - Newsy";
  11. $rss->description = "10 ostatnich news\xc3\xb3w z naszej strony w skr\xc3\xb3cie specjalnie dla Was - bo zawsze jest inne wyj\xc5\x9bcie";
  12. $rss->xslStyleSheet = "ai3b.xsl";
  13. $rss->link = "http://www.komunikatory.pl/";
  14. $rss->feedURL = "http://www.komunikatory.pl/rss/newsy";
  15.  
  16. @mysql_connect($dbhost, $dbuser, $dbpasswd);
  17. @mysql_select_db($dbname);
  18. [email protected]_query("SET names latin2;");
  19.  
  20. @mysql_query("SET names utf8;");
  21.  
  22. $res = mysql_query('SELECT * FROM jp_news WHERE stat = 1 ORDER BY id DESC LIMIT 10');
  23.  
  24. $convert = new converter();
  25. while($row = mysql_fetch_assoc($res))
  26. {
  27.    $item = new FeedItem();
  28.    $item->title = $row['title'];//$convert->iso2utf($row['title']);
  29.    $item->link = 'http://www.komunikatory.pl/news-'.$row['id'];
  30.    $item->description = strip_tags($row['text']);//$convert->iso2utf(strip_tags($row['text']));
  31.    $item->keywords = explode(' ', $row['title']);//explode(' ', $convert->iso2utf($row['title']));
  32.  
  33.    //optional
  34.    //$item->descriptionTruncSize = 200;
  35.    $item->descriptionHtmlSyndicated = false;
  36.  
  37.    $item->date = (int) $row['date'];
  38.    $item->author = strip_tags($row['author']);//$convert->iso2utf(strip_tags($row['author']));
  39.  
  40.    $rss->addItem($item);
  41. }
  42.  
  43. print $rss->saveFeed("RSS2.0", "cache/rss-newsy.xml");
  44.  
  45. ?>
  46.  
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda