login  Naam:   Wachtwoord: 
Registreer je!
 Forum

[RSS] Feeds weergeven niks?

Offline Lunfra - 01/02/2009 13:27
Avatar van LunfraNieuw lid Goed, een simpel dingetje slaat uit tot iets een heel erg nogal raar probleem...

Ik heb een RSS-generatortje gebouwd voor bij m'n blog. Geen probleem zal je denken. Nu wil ik 'm dus ook images laten meenemen in de RSS, maar op de een of andere manier geeft 'ie, zodra ik de images wil laten invoegen, helemaal niets weer.

Generator:
  1. <?php
  2. chmod ( "rss.xml" , 0777 ) ;
  3. $f = fopen ( "rss.xml" , 'w+' ) ;
  4. fwrite ( $f , "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n" ) ;
  5. fwrite ( $f , "<rss version=\"2.0\">\n" ) ;
  6. fwrite ( $f , "\t<channel>\n" ) ;
  7. fwrite ( $f , "\t\t<title>Lunfra365</title>\n" ) ;
  8. fwrite ( $f , "\t\t<link>http://www.lunfra.nl/</link>\n" ) ;
  9. fwrite ( $f , "\t\t<description></description>\n" ) ;
  10. fwrite ( $f , "\t\t<language>nl</language>\n" ) ;
  11. fwrite ( $f , "\t\t<copyright>Copyright 2009</copyright>\n" ) ;
  12. fwrite ( $f , "\t\t<lastBuildDate>" . date ( 'D, d M Y H:i:s' ) . " +0100</lastBuildDate>\n" ) ;
  13. fwrite ( $f , "\t\t<generator>http://www.lunfra.nl/</generator>\n" ) ;
  14. fwrite ( $f , "\t\t<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n" ) ;
  15. $query = mysql_query ( "
  16. SELECT *
  17. FROM `fotolog`
  18. ORDER BY `id` DESC
  19. LIMIT 15
  20. " ) or die ( mysql_error ( ) ) ;
  21. if ( mysql_num_rows ( $query ) == 0 )
  22. {
  23. fwrite ( $f , "\t\t\t\t<item>\n" ) ;
  24. fwrite ( $f , "\t\t\t<title>Layouts Lunfra365 bekend!</title>\n" ) ;
  25. fwrite ( $f , "\t\t\t<description>De layouts voor Lunfra365 zijn bekend! Check de website voor meer.</description>\n" ) ;
  26. fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl</link>\n" ) ;
  27. fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/</guid>\n" );
  28. fwrite ( $f , "\t\t\t<pubDate>Sun, 01 Feb 2009 13:00:04 +0100</pubDate>\n" ) ;
  29. fwrite ( $f , "\t\t</item>\n" ) ;
  30. fwrite ( $f , "\t\t\n" ) ;
  31. fwrite ( $f , "\t\t<item>\n" ) ;
  32. fwrite ( $f , "\t\t\t<title>Lunfra365 komt eraan!</title>\n" ) ;
  33. fwrite ( $f , "\t\t\t<description>Vanaf 3 februari komt Lunfra365 naar je toe! Check de website voor meer.</description>\n" ) ;
  34. fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl/</link>\n" ) ;
  35. fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/</guid>\n" ) ;
  36. fwrite ( $f , "\t\t\t<pubDate>Tue, 01 Jan 2009 00:00:00 +0100</pubDate>\n" ) ;
  37. fwrite ( $f , "\t\t</item>\n" ) ;
  38. fwrite ( $f , "\t\t\n" ) ;
  39. } else
  40. {
  41. while ( $list = mysql_fetch_assoc ( $query ) )
  42. {
  43. fwrite ( $f , "\t\t\n" ) ;
  44. fwrite ( $f , "\t\t<item>\n" ) ;
  45. fwrite ( $f , "\t\t\t<title>" . $list [ 'title' ] . "</title>\n" ) ;
  46. fwrite ( $f , "\t\t\t<description>" ) ;
  47. fwrite ( $f , "&lt;img src=" . htmlspecialchars($list [ 'imgurl' ]) . " alt=Afbeelding /&gt;" ) ;
  48. fwrite ( $f , "&lt;br /&gt;" ) ;
  49. fwrite ( $f , $list [ 'onderschrift' ] ) ;
  50. fwrite ( $f , "</description>\n" ) ;
  51. fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl/day/" . $list [ 'id' ] . "</link>\n" ) ;
  52. fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/day/" . $list [ 'id' ] ."</link>\n" ) ;
  53. fwrite ( $f , "\t\t\t<pubDate>" . date ( 'D, d M Y H:i:s', $list [ 'timedate' ] ) . " +0100</pubDate>\n" ) ;
  54. fwrite ( $f , "\t\t\t<author>Jeroen Voortman &lt;Jeroen@Lunfra.nl&gt;</author>\n" ) ;
  55. fwrite ( $f , "\t\t</item>\n" ) ;
  56. fwrite ( $f , "\t\t\n" ) ;
  57. }
  58. }
  59. fwrite ( $f , "\t</channel>\n" ) ;
  60. fwrite ( $f , "</rss>\n" ) ;
  61. fclose ( $f ) ;
  62. ?>


RSS-output
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <rss version="2.0">
  3. <channel>
  4. <title>Lunfra365</title>
  5. <link>http://www.lunfra.nl/</link>
  6. <description></description>
  7. <language>nl</language>
  8. <copyright>Copyright 2009</copyright>
  9.  
  10. <lastBuildDate>Sun, 01 Feb 2009 13:20:05 +0100</lastBuildDate>
  11. <generator>http://www.lunfra.nl/</generator>
  12. <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  13.  
  14. <item>
  15. <title>Blaat</title>
  16. <description>&lt;img src=http://assen.lunfra.nl:81/uploaded/d798b13560578965e6b5835f82010.png alt=Afbeelding /&gt;&lt;br /&gt;Lunfra365/Lunfra2010</description>
  17.  
  18. <link>http://www.lunfra.nl/day/6</link>
  19. <guid isPermalink="true">http://www.lunfra.nl/day/6</link>
  20.  
  21. <pubDate>Wed, 28 Jan 2009 22:30:37 +0100</pubDate>
  22. <author>Jeroen Voortman &lt;Jeroen@Lunfra.nl&gt;</author>
  23. </item>
  24.  
  25.  
  26. <item>
  27.  
  28. <title>Blaat</title>
  29. <description>&lt;img src=http://assen.lunfra.nl:81/uploaded/d798b13560578965e6b52010.png alt=Afbeelding /&gt;&lt;br /&gt;Lunfra365/Lunfra2010</description>
  30. <link>http://www.lunfra.nl/day/5</link>
  31. <guid isPermalink="true">http://www.lunfra.nl/day/5</link>
  32. <pubDate>Wed, 28 Jan 2009 22:30:06 +0100</pubDate>
  33.  
  34. <author>Jeroen Voortman &lt;Jeroen@Lunfra.nl&gt;</author>
  35. </item>
  36.  
  37.  
  38. <item>
  39. <title>Blaat</title>
  40. <description>&lt;img src=http://assen.lunfra.nl:81/uploaded/2010.png alt=Afbeelding /&gt;&lt;br /&gt;Lunfra365/Lunfra2010</description>
  41. <link>http://www.lunfra.nl/day/4</link>
  42.  
  43. <guid isPermalink="true">http://www.lunfra.nl/day/4</link>
  44. <pubDate>Wed, 28 Jan 2009 22:29:37 +0100</pubDate>
  45. <author>Jeroen Voortman &lt;Jeroen@Lunfra.nl&gt;</author>
  46. </item>
  47.  
  48.  
  49. <item>
  50. <title>Iets...</title>
  51.  
  52. <description>&lt;img src=http://abc0ba132a32d693.users.storage.live.com/MyData/MyProfile/GeneralProfile/ProfilePhoto:Thumbnail?fofoff=1&amp;ex=24&amp;ck=633687496189259977 alt=Afbeelding /&gt;&lt;br /&gt;</description>
  53. <link>http://www.lunfra.nl/day/3</link>
  54. <guid isPermalink="true">http://www.lunfra.nl/day/3</link>
  55. <pubDate>Wed, 08 Sep 1915 04:43:08 +0100</pubDate>
  56. <author>Jeroen Voortman &lt;Jeroen@Lunfra.nl&gt;</author>
  57.  
  58. </item>
  59.  
  60.  
  61. <item>
  62. <title>Logo</title>
  63. <description>&lt;img src=http://assen.lunfra.nl:81/lunfra/365/afbeeldingen/header.gif alt=Afbeelding /&gt;&lt;br /&gt;</description>
  64. <link>http://www.lunfra.nl/day/2</link>
  65. <guid isPermalink="true">http://www.lunfra.nl/day/2</link>
  66.  
  67. <pubDate>Sun, 07 Sep 2014 06:50:07 +0100</pubDate>
  68. <author>Jeroen Voortman &lt;Jeroen@Lunfra.nl&gt;</author>
  69. </item>
  70.  
  71.  
  72. <item>
  73. <title>PMA-logo</title>
  74. <description>&lt;img src=http://assen.lunfra.nl:81/phpmyadmin/themes/original/img/logo_left.png alt=Afbeelding /&gt;&lt;br /&gt;PHPMyAdmin-logo</description>
  75.  
  76. <link>http://www.lunfra.nl/day/1</link>
  77. <guid isPermalink="true">http://www.lunfra.nl/day/1</link>
  78. <pubDate>Sun, 07 Sep 2014 06:50:07 +0100</pubDate>
  79. <author>Jeroen Voortman &lt;Jeroen@Lunfra.nl&gt;</author>
  80. </item>
  81.  
  82. </channel>
  83.  
  84. </rss>

1 antwoord

Gesponsorde links
Offline Wim - 01/02/2009 17:01
Avatar van Wim Crew algemeen $list [ 'imgurl' ] <= wat zit daar in? Enkel '1', '2', ... volgens mij (aan je output te zien)

Zitten er geen foutieve waardes in je db?
Gesponsorde links
Dit onderwerp is gesloten.
Actieve forumberichten
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.188s