Hello Andre Polykanine,

Am 2010-08-27 12:55:51, hacktest Du folgendes herunter:
> Hello Michelle,
> 
> Hm. link rel="alternate"... that's a good one, thanks (btw, you say me
> that I should RTFM, but if I knew what to read....).
> Now there are two questions:
> 1. How do I do those .RSS files with PHP? All of mmy blog entries and
> other stuff are in MySql. There are classes that can echo the
> appropriate data as RSS, but there will be more .PHP files, not
> .RSS/.XML ones. So how do we manage that?
> 2. Should I make a separate .RSS file for each type of feeds (blog
> feed, comments feed, timeline feed, news feed)?

The Internet is full of HOWTOs which explain HOW-TO-MAKE-A-RSS-FEED...

However sometimes back I asked HERE IN THIS LIST the same IDIOTQUESTION!

You could have searched THIS LIST...  :-P

OK, since I now know, how to make RSS Feeds here some advice:

1)  you should know, how many days or hoe many items should be stored
    in the RSS feed

2)  Create for each article in the BLOG in a directory a file like

    ----8<--------------------------------------------------------------
    <item>
    <title>PHP Website</title>
    <link>http://www.php.net/</link>
    <description>Great programmers Website, where you an find nice peoples on 
the mailinglist, which explain how RSS is working.</description>
    <guid isPermaLink="true">http://blog.pnp.net/items/1258834764.html</guid>
    <pubDate>Sat, 21 Nov 2009 21:20:12 +0100</pubDate>
    </item>
    ----8<--------------------------------------------------------------

    and save them using the UNIX serialtime like 1258834764.rss
    The included "isPermaLink" should point to the BLOG article

3)  Now you have to create the index.rss.tmp with the HEADER which looks
    like

    ----8<--------------------------------------------------------------
    <?xml version="1.0" encoding="UTF-8"?>

    <rss version="2.0" 
xmlns:blogChannel="http://backend.userland.com/blogChannelModule";>

    <channel>

    <title>PHP Superhere PHP RSS Feed</title>
    <link>http://www.php.net/</link>
    <description>PHP RSS Feed Overview</description>
    <language>en</language>
    <copyright>Copyright 2010, Michelle Konzack</copyright>
    <lastBuildDate>Sun, 29 Aug 2010 04:13:17 +0200</lastBuildDate>
    <docs>http://www.php.net/michelles_php_rss_feed/</docs>
    <managingEditor>linux4miche...@tamay-dogan.net</managingEditor>
    <webMaster>webmas...@php.net</webMaster>
    <ttl>10</ttl>

    <image>
    <title>PHP Website</title>
    <url>http://www.php.net/logo.png</url>
    <link>www.php.net</link>
    <width>120</width>
    <height>160</height>
    <description>PHP Logo</description>
    </image>
    ----8<--------------------------------------------------------------


    Now pipe how much (and in order ) the messages build under 2) at the
    end and of this file...

4)  close the RSS feed index.rss.tmp with

    ----8<--------------------------------------------------------------
    </channel>
    
    </rss>
    ----8<--------------------------------------------------------------

5)  now move

    mv index.rss.tmp <doc_root>/index.rss

thats all

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsyst...@tdnet France EURL       itsyst...@tdnet UG (limited liability)
Owner Michelle Konzack            Owner Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz                 Kinzigstra├če 17
67100 Strasbourg/France           77694 Kehl/Germany
Tel: +33-6-61925193 mobil         Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

<http://www.itsystems.tamay-dogan.net/>  <http://www.flexray4linux.org/>
<http://www.debian.tamay-dogan.net/>         <http://www.can4linux.org/>

Jabber linux4miche...@jabber.ccc.de
ICQ    #328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature

Reply via email to