Sorry

This feed does not validate.

Source: http://ad-today.idigitaledition.com/rss

  1. <?php
  2. require_once('./application/functions/include.fns.php');
  3. header("content-type: application/rss+xml");
  4.  
  5. $categories = explode( ',', $publication->rssCategory);
  6. $description = $publication->rssDescription;
  7. mysql_select_db( DB_DATABASE_SETUP );
  8. $category = '';
  9. foreach( $categories as $count => $id ){
  10. $query = "SELECT category ".
  11. "FROM ".CATEGORIES." ".
  12. "WHERE id = '".$id."'";
  13. $result = mysql_query( $query );
  14. $row = mysql_fetch_array( $result );
  15. $category .= "\t\t\t<category>".rss_text($row['category'])."</category>\n";
  16. }
  17. mysql_select_db( DB_DATABASE );
  18. # make rss for issues first
  19. $issue = new issue();
  20. $issues = $issue->get_issues();
  21. foreach( $issues as $count => $Issue ){
  22. list($y,$m,$d) = sscanf($Issue->digital_publish_date, "%d-%d-%d");
  23. $rss_i .= "\t\t<item>\n";
  24. $rss_i .= "\t\t\t<title>".rss_text($Issue->title)."</title>\n";
  25. $rss_i .= "\t\t\t<description><![CDATA[".$Issue->description."]]></description>\n";
  26. $rss_i .= "\t\t\t<pubDate>".date("D, d M Y H:i:s", mktime(1,1,1,$m,$d,$y))." GMT</pubDate>\n";
  27. $rss_i .= "\t\t\t<author>".rss_text($publication->title)." [email protected]</author>\n";
  28. $rss_i .= "\t\t\t<guid isPermaLink=\"true\">".IDIGI_URL."issues/".$Issue->id."/</guid>\n";
  29. $rss_i .= "\t\t\t<link>".IDIGI_URL."issues/".$Issue->path."/</link>\n";
  30. $rss_i .= $category;
  31. $rss_i .= "\t\t\t<source url=\"".IDIGI_URL."rss\">".rss_text($publication->title)."</source>\n";
  32. $rss_i .= "\t\t</item>\n";
  33. }
  34. $rss_i .= "\t</channel>\n";
  35. $rss_i .= "</rss>\n";
  36. # beginning of rss
  37. $rss  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
  38. $rss .= "<rss version=\"2.0\">\n";
  39. $rss .= "\t<channel>\n";
  40. $rss .= "\t\t<title>".rss_text($publication->title)."</title>\n";
  41. $rss .= "\t\t<link>".IDIGI_URL."</link>\n";
  42. $rss .= "\t\t<language>en-us</language>\n";
  43. $rss .= "\t\t<copyright>&#xA9; ".rss_text($publication->title)."</copyright>\n";
  44. $rss .= "\t\t<description><![CDATA[".rss_text($description)."]]></description>\n";
  45. $rss .= "\t\t<lastBuildDate>".date("D, d M Y H:i:s", mktime(1,1,1,$m,$d,$y))." EST</lastBuildDate>\n\n";
  46. $rss .= $rss_i;
  47. echo $rss;
  48.  
  49. ?>
Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda