Nieuw 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:
<?php
chmod ( "rss.xml" , 0777 ) ;
$f = fopen ( "rss.xml" , 'w+' ) ;
fwrite ( $f , "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n" ) ;
fwrite ( $f , "<rss version=\"2.0\">\n" ) ;
fwrite ( $f , "\t<channel>\n" ) ;
fwrite ( $f , "\t\t<title>Lunfra365</title>\n" ) ;
fwrite ( $f , "\t\t<link>http://www.lunfra.nl/</link>\n" ) ;
fwrite ( $f , "\t\t<description></description>\n" ) ;
fwrite ( $f , "\t\t<language>nl</language>\n" ) ;
fwrite ( $f , "\t\t<copyright>Copyright 2009</copyright>\n" ) ;
fwrite ( $f , "\t\t<lastBuildDate>" . date ( 'D, d M Y H:i:s' ) . " +0100</lastBuildDate>\n" ) ;
fwrite ( $f , "\t\t<generator>http://www.lunfra.nl/</generator>\n" ) ;
fwrite ( $f , "\t\t<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n" ) ;
$query = mysql_query ( "
SELECT *
FROM `fotolog`
ORDER BY `id` DESC
LIMIT 15
" ) or die ( mysql_error ( ) ) ;
if ( mysql_num_rows ( $query ) == 0 )
{
fwrite ( $f , "\t\t\t\t<item>\n" ) ;
fwrite ( $f , "\t\t\t<title>Layouts Lunfra365 bekend!</title>\n" ) ;
fwrite ( $f , "\t\t\t<description>De layouts voor Lunfra365 zijn bekend! Check de website voor meer.</description>\n" ) ;
fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl</link>\n" ) ;
fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/</guid>\n" );
fwrite ( $f , "\t\t\t<pubDate>Sun, 01 Feb 2009 13:00:04 +0100</pubDate>\n" ) ;
fwrite ( $f , "\t\t</item>\n" ) ;
fwrite ( $f , "\t\t\n" ) ;
fwrite ( $f , "\t\t<item>\n" ) ;
fwrite ( $f , "\t\t\t<title>Lunfra365 komt eraan!</title>\n" ) ;
fwrite ( $f , "\t\t\t<description>Vanaf 3 februari komt Lunfra365 naar je toe! Check de website voor meer.</description>\n" ) ;
fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl/</link>\n" ) ;
fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/</guid>\n" ) ;
fwrite ( $f , "\t\t\t<pubDate>Tue, 01 Jan 2009 00:00:00 +0100</pubDate>\n" ) ;
fwrite ( $f , "\t\t</item>\n" ) ;
fwrite ( $f , "\t\t\n" ) ;
} else
{
while ( $list = mysql_fetch_assoc ( $query ) )
{
fwrite ( $f , "\t\t\n" ) ;
fwrite ( $f , "\t\t<item>\n" ) ;
fwrite ( $f , "\t\t\t<title>" . $list [ 'title' ] . "</title>\n" ) ;
fwrite ( $f , "\t\t\t<description>" ) ;
fwrite ( $f , "<img src=" . htmlspecialchars($list [ 'imgurl' ]) . " alt=Afbeelding />" ) ;
fwrite ( $f , "<br />" ) ;
fwrite ( $f , $list [ 'onderschrift' ] ) ;
fwrite ( $f , "</description>\n" ) ;
fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl/day/" . $list [ 'id' ] . "</link>\n" ) ;
fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/day/" . $list [ 'id' ] ."</link>\n" ) ;
fwrite ( $f , "\t\t\t<pubDate>" . date ( 'D, d M Y H:i:s', $list [ 'timedate' ] ) . " +0100</pubDate>\n" ) ;
fwrite ( $f , "\t\t\t<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>\n" ) ;
fwrite ( $f , "\t\t</item>\n" ) ;
fwrite ( $f , "\t\t\n" ) ;
}
}
fwrite ( $f , "\t</channel>\n" ) ;
fwrite ( $f , "</rss>\n" ) ;
fclose ( $f ) ;
?>
<?php chmod ( "rss.xml" , 0777 ) ; $f = fopen ( "rss.xml" , 'w+' ) ; fwrite ( $f , "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n" ) ; fwrite ( $f , "<rss version=\"2.0\">\n" ) ; fwrite ( $f , "\t<channel>\n" ) ; fwrite ( $f , "\t\t<title>Lunfra365</title>\n" ) ; fwrite ( $f , "\t\t<link>http://www.lunfra.nl/</link>\n" ) ; fwrite ( $f , "\t\t<description></description>\n" ) ; fwrite ( $f , "\t\t<language>nl</language>\n" ) ; fwrite ( $f , "\t\t<copyright>Copyright 2009</copyright>\n" ) ; fwrite ( $f , "\t\t<lastBuildDate>" . date ( 'D, d M Y H:i:s' ) . " +0100</lastBuildDate>\n" ) ; fwrite ( $f , "\t\t<generator>http://www.lunfra.nl/</generator>\n" ) ; fwrite ( $f , "\t\t<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n" ) ; SELECT * FROM `fotolog` ORDER BY `id` DESC LIMIT 15 { fwrite ( $f , "\t\t\t\t<item>\n" ) ; fwrite ( $f , "\t\t\t<title>Layouts Lunfra365 bekend!</title>\n" ) ; fwrite ( $f , "\t\t\t<description>De layouts voor Lunfra365 zijn bekend! Check de website voor meer.</description>\n" ) ; fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl</link>\n" ) ; fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/</guid>\n" ); fwrite ( $f , "\t\t\t<pubDate>Sun, 01 Feb 2009 13:00:04 +0100</pubDate>\n" ) ; fwrite ( $f , "\t\t</item>\n" ) ; fwrite ( $f , "\t\t<item>\n" ) ; fwrite ( $f , "\t\t\t<title>Lunfra365 komt eraan!</title>\n" ) ; fwrite ( $f , "\t\t\t<description>Vanaf 3 februari komt Lunfra365 naar je toe! Check de website voor meer.</description>\n" ) ; fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl/</link>\n" ) ; fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/</guid>\n" ) ; fwrite ( $f , "\t\t\t<pubDate>Tue, 01 Jan 2009 00:00:00 +0100</pubDate>\n" ) ; fwrite ( $f , "\t\t</item>\n" ) ; } else { { fwrite ( $f , "\t\t<item>\n" ) ; fwrite ( $f , "\t\t\t<title>" . $list [ 'title' ] . "</title>\n" ) ; fwrite ( $f , "\t\t\t<description>" ) ; fwrite ( $f , "<br />" ) ; fwrite ( $f , $list [ 'onderschrift' ] ) ; fwrite ( $f , "</description>\n" ) ; fwrite ( $f , "\t\t\t<link>http://www.lunfra.nl/day/" . $list [ 'id' ] . "</link>\n" ) ; fwrite ( $f , "\t\t\t<guid isPermalink=\"true\">http://www.lunfra.nl/day/" . $list [ 'id' ] ."</link>\n" ) ; fwrite ( $f , "\t\t\t<pubDate>" . date ( 'D, d M Y H:i:s', $list [ 'timedate' ] ) . " +0100</pubDate>\n" ) ; fwrite ( $f , "\t\t\t<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>\n" ) ; fwrite ( $f , "\t\t</item>\n" ) ; } } fwrite ( $f , "\t</channel>\n" ) ; ?>
RSS-output
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
<title>Lunfra365</title>
<link>http://www.lunfra.nl/</link>
<description></description>
<language>nl</language>
<copyright>Copyright 2009</copyright>
<lastBuildDate>Sun, 01 Feb 2009 13:20:05 +0100</lastBuildDate>
<generator>http://www.lunfra.nl/</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<item>
<title>Blaat</title>
<description><img src=http://assen.lunfra.nl:81/uploaded/d798b13560578965e6b5835f82010.png alt=Afbeelding /><br />Lunfra365/Lunfra2010</description>
<link>http://www.lunfra.nl/day/6</link>
<guid isPermalink="true">http://www.lunfra.nl/day/6</link>
<pubDate>Wed, 28 Jan 2009 22:30:37 +0100</pubDate>
<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>
</item>
<item>
<title>Blaat</title>
<description><img src=http://assen.lunfra.nl:81/uploaded/d798b13560578965e6b52010.png alt=Afbeelding /><br />Lunfra365/Lunfra2010</description>
<link>http://www.lunfra.nl/day/5</link>
<guid isPermalink="true">http://www.lunfra.nl/day/5</link>
<pubDate>Wed, 28 Jan 2009 22:30:06 +0100</pubDate>
<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>
</item>
<item>
<title>Blaat</title>
<description><img src=http://assen.lunfra.nl:81/uploaded/2010.png alt=Afbeelding /><br />Lunfra365/Lunfra2010</description>
<link>http://www.lunfra.nl/day/4</link>
<guid isPermalink="true">http://www.lunfra.nl/day/4</link>
<pubDate>Wed, 28 Jan 2009 22:29:37 +0100</pubDate>
<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>
</item>
<item>
<title>Iets...</title>
<description><img src=http://abc0ba132a32d693.users.storage.live.com/MyData/MyProfile/GeneralProfile/ProfilePhoto:Thumbnail?fofoff=1&ex=24&ck=633687496189259977 alt=Afbeelding /><br /></description>
<link>http://www.lunfra.nl/day/3</link>
<guid isPermalink="true">http://www.lunfra.nl/day/3</link>
<pubDate>Wed, 08 Sep 1915 04:43:08 +0100</pubDate>
<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>
</item>
<item>
<title>Logo</title>
<description><img src=http://assen.lunfra.nl:81/lunfra/365/afbeeldingen/header.gif alt=Afbeelding /><br /></description>
<link>http://www.lunfra.nl/day/2</link>
<guid isPermalink="true">http://www.lunfra.nl/day/2</link>
<pubDate>Sun, 07 Sep 2014 06:50:07 +0100</pubDate>
<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>
</item>
<item>
<title>PMA-logo</title>
<description><img src=http://assen.lunfra.nl:81/phpmyadmin/themes/original/img/logo_left.png alt=Afbeelding /><br />PHPMyAdmin-logo</description>
<link>http://www.lunfra.nl/day/1</link>
<guid isPermalink="true">http://www.lunfra.nl/day/1</link>
<pubDate>Sun, 07 Sep 2014 06:50:07 +0100</pubDate>
<author>Jeroen Voortman <Jeroen@Lunfra.nl></author>
</item>
</channel>
</rss>
<?xml version="1.0" encoding="iso-8859-1"?> <rss version="2.0"> <channel> <title>Lunfra365</title> <link>http://www.lunfra.nl/</link> <description></description> <language>nl</language> <copyright>Copyright 2009</copyright> <lastBuildDate>Sun, 01 Feb 2009 13:20:05 +0100</lastBuildDate> <generator>http://www.lunfra.nl/</generator> <docs>http://blogs.law.harvard.edu/tech/rss</docs> <item> <title>Blaat</title> <description><img src=http://assen.lunfra.nl:81/uploaded/d798b13560578965e6b5835f82010.png alt=Afbeelding /><br />Lunfra365/Lunfra2010</description> <link>http://www.lunfra.nl/day/6</link> <guid isPermalink="true">http://www.lunfra.nl/day/6</link> <pubDate>Wed, 28 Jan 2009 22:30:37 +0100</pubDate> <author>Jeroen Voortman <Jeroen@Lunfra.nl></author> </item> <item> <title>Blaat</title> <description><img src=http://assen.lunfra.nl:81/uploaded/d798b13560578965e6b52010.png alt=Afbeelding /><br />Lunfra365/Lunfra2010</description> <link>http://www.lunfra.nl/day/5</link> <guid isPermalink="true">http://www.lunfra.nl/day/5</link> <pubDate>Wed, 28 Jan 2009 22:30:06 +0100</pubDate> <author>Jeroen Voortman <Jeroen@Lunfra.nl></author> </item> <item> <title>Blaat</title> <description><img src=http://assen.lunfra.nl:81/uploaded/2010.png alt=Afbeelding /><br />Lunfra365/Lunfra2010</description> <link>http://www.lunfra.nl/day/4</link> <guid isPermalink="true">http://www.lunfra.nl/day/4</link> <pubDate>Wed, 28 Jan 2009 22:29:37 +0100</pubDate> <author>Jeroen Voortman <Jeroen@Lunfra.nl></author> </item> <item> <title>Iets...</title> <description><img src=http://abc0ba132a32d693.users.storage.live.com/MyData/MyProfile/GeneralProfile/ProfilePhoto:Thumbnail?fofoff=1&ex=24&ck=633687496189259977 alt=Afbeelding /><br /></description> <link>http://www.lunfra.nl/day/3</link> <guid isPermalink="true">http://www.lunfra.nl/day/3</link> <pubDate>Wed, 08 Sep 1915 04:43:08 +0100</pubDate> <author>Jeroen Voortman <Jeroen@Lunfra.nl></author> </item> <item> <title>Logo</title> <description><img src=http://assen.lunfra.nl:81/lunfra/365/afbeeldingen/header.gif alt=Afbeelding /><br /></description> <link>http://www.lunfra.nl/day/2</link> <guid isPermalink="true">http://www.lunfra.nl/day/2</link> <pubDate>Sun, 07 Sep 2014 06:50:07 +0100</pubDate> <author>Jeroen Voortman <Jeroen@Lunfra.nl></author> </item> <item> <title>PMA-logo</title> <description><img src=http://assen.lunfra.nl:81/phpmyadmin/themes/original/img/logo_left.png alt=Afbeelding /><br />PHPMyAdmin-logo</description> <link>http://www.lunfra.nl/day/1</link> <guid isPermalink="true">http://www.lunfra.nl/day/1</link> <pubDate>Sun, 07 Sep 2014 06:50:07 +0100</pubDate> <author>Jeroen Voortman <Jeroen@Lunfra.nl></author> </item> </channel> </rss>
|