Discussion:
creating rss feeds - how do u do it?
Maureen
2005-11-12 19:54:16 UTC
Permalink
I have been hand coding html pages for 8 or 9 years now. I prefer to
hand code, because I am a programmer by nature, and it allows me to
better understand what I am doing (and it helps me to keep the code
clean cut).

About 2 years ago, I started switching my pages to PHP - I love PHP!
Makes my life tons easier.

I've only recently started messing with RSS feeds. I had heard of
them, but I didn't know how they were used, so I could see the benefit
to our customers. Now I'm sold. However, I've got a few questions.

Currently, I work on a local Linux box to create my php pages.
Internally we send text products to this Linux box, which has a cron
that runs scripts to generate a several of my php pages (or at least
the data used in the php pages). As part of that cron, it then uploads
the updated files to our internet server.

That's also how I'm creating my RSS files which I am now playing with.
I'm still trying to understand the relationship between RSS, XML, etc.
If I understand it correctly, all RSS files are XML, but not all XML
are RSS. Essentially RSS files are a subset of XML. Any way here are a
couple of my feeds (they are being publicized yet since I am still
working out the kinks):
http://www.prh.noaa.gov/cphc/index-cp.xml
http://www.prh.noaa.gov/hnl/top_news.xml

The content in each of these files could be grabbed using PHP. Can I
use PHP to create a rss file? The file would then have a php extension
- would that cause problems for rss readers?

With the dynamic nature of rss feeds, how do most of you create the feed?

Thanks in advance for any input!

Maureen








Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rss-dev/

<*> To unsubscribe from this group, send an email to:
rss-dev-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Bill Kearney
2005-11-13 03:40:32 UTC
Permalink
Post by Maureen
I have been hand coding html pages for 8 or 9 years now. I prefer to
hand code, because I am a programmer by nature, and it allows me to
better understand what I am doing (and it helps me to keep the code
clean cut).
If you've got database storage it's often a lot less headache to use that
for building your RSS feeds. That way you only have to learn the tedious
bits of XML and RSS requirements once for the code that generates the feed.
Not every time you're pressed for time and running amok with emacs. (he
says, from personal experience...)
Post by Maureen
Currently, I work on a local Linux box to create my php pages.
Internally we send text products to this Linux box, which has a cron
that runs scripts to generate a several of my php pages (or at least
the data used in the php pages). As part of that cron, it then uploads
the updated files to our internet server.
Sounds about right.
Post by Maureen
That's also how I'm creating my RSS files which I am now playing with.
I'm still trying to understand the relationship between RSS, XML, etc.
If I understand it correctly, all RSS files are XML, but not all XML
are RSS. Essentially RSS files are a subset of XML.
Well, not really. XML is XML. It's got it's own rules most commonly
recognized under the concept of being 'well formed'. Having all the angle
brackets match up and following a few rules about encoding certain
characters (5 specifically "&',<?)
Post by Maureen
The content in each of these files could be grabbed using PHP. Can I
use PHP to create a rss file? The file would then have a php extension
- would that cause problems for rss readers?
Nope, URL extensions make no difference in ANY readers. It's the MIME type
you want to set properly; as 'application/rss+xml'.
Post by Maureen
With the dynamic nature of rss feeds, how do most of you create the feed?
If you're already savvy with cron then how about using PHP from within a
cron job to dump the data right into static files? No sense using a dynamic
page on the server unless you've got live data that can't be generated ahead
of time as a static file. Plenty of sites do it this way. MovableType
blogs are almost entirely statically served. The script dump everything
through templates and then out to static files. Much quicker web serving
with no added dynamic code on the server (not that PHP's all that demanding
for most simple stuff).

Hope this helps.

-Bill Kearney
Syndic8.com




Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rss-dev/

<*> To unsubscribe from this group, send an email to:
rss-dev-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Gordon Stewart
2005-12-31 17:44:57 UTC
Permalink
Post by Bill Kearney
If you're already savvy with cron then how about using PHP from within a
cron job to dump the data right into static files? No sense using a dynamic
page on the server unless you've got live data that can't be
generated ahead
Post by Bill Kearney
of time as a static file. Plenty of sites do it this way. MovableType
blogs are almost entirely statically served. The script dump everything
through templates and then out to static files. Much quicker web serving
with no added dynamic code on the server (not that PHP's all that demanding
for most simple stuff).
Hi there - I might use a cron job (in future) to create static RSS files.

SUMMARY :-

:- I am auto-generating RSS page by PHP script...

:- I can access the RSS page via a reader - & it validates correctly..
My reader DOES 'get' the RSS feed ONE time...

However - If I update the web-page - & wait for the RSS database to
update - I tell my RSS reader to get new feeds etc.. / update itself -
however nothing happens..

(my reader is OK - As I am receiving other feeds ok...)

I am using PHP with this header :-

if ($rss=="true"){
header("Content-type: application/rss+xml");
}


Im off to bed now / soon - But i'll update the page when I get online...

The feed is :-

(website)

http://updates.kwister.com/?sub=www

http://updates.kwister.com/?sub=www&rss=true


If you want to see my actual RSS code - its located :-

http://updates.kwister.com/?sub=www$rss=true&test=1

(this will show you the HTML/RSS code - without the rss header - in
your web-browser)



QUERY

Is my html / RSS code correct ? - I am following various RSS
tutorials.. - However my RSS reader doesnt retrieve the updated
information (apart from the 1st time) - I have had to delete & re-add
the RSS feed info - to get the information..

Any suggestions please - Thankyou....


Happy new year (6:41 a.m. - 1st Jan - Im off to bed now - Goodnight...)

G












Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rss-dev/

<*> To unsubscribe from this group, send an email to:
rss-dev-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Gordon Stewart
2006-01-01 07:56:07 UTC
Permalink
Post by Gordon Stewart
SUMMARY :-
:- I am auto-generating RSS page by PHP script...
:- I can access the RSS page via a reader - & it validates correctly..
My reader DOES 'get' the RSS feed ONE time...
Ive got the RSS going -

I WAS using Mozilla Firefox to read the RSS (didnt go / Update...)

But I've d/loaded annother RSS reader - & when I update my website - &
the RSS database updates - I do get the updated info :) :)

Is this 'normal' - For some RSS readers to not process correctly -
While others do ??


Hmm - Quiet group aye :)

--
G
Yahoo Archives by email = Yes
http://groups.kwister.com/owners.php#add
NZ community groups - community-***@public.gmane.org





Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rss-dev/

<*> To unsubscribe from this group, send an email to:
rss-dev-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Lucas Gonze
2006-01-02 08:42:20 UTC
Permalink
Post by Gordon Stewart
Is this 'normal' - For some RSS readers to not process correctly -
While others do ??
Yeah, RSS processing is traditionally a big mess. Situation normal.




Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rss-dev/

<*> To unsubscribe from this group, send an email to:
rss-dev-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

James Holderness
2005-11-13 05:54:20 UTC
Permalink
For future reference, this mailing list is really only meant for RSS 1.0
related discussions. Since your feeds are using RSS 2.0 (which is a
substantially different format) you'd probably be better off asking any
future questions on an RSS 2.0 mailing list
(http://groups.yahoo.com/group/RSS2-Support/ is one example).
Post by Maureen
I have been hand coding html pages for 8 or 9 years now. I prefer to
hand code, because I am a programmer by nature, and it allows me to
better understand what I am doing (and it helps me to keep the code
clean cut).
If you are going to be hand coding RSS you should make absolutely sure that
you know the specifications inside out (both RSS and XML). It's very easy to
make a mistake with these things. To help with that, I'd strongly recommend
you run your feeds through the feed validator (www.feedvalidator.org) on a
regular basis.

For a start, you'll notice that your dates aren't valid (UTC isn't a valid
timezone in RFC822). Also (although the validator doesn't catch this) your
image url is pointing to an icon file (according to the spec it should be a
gif, jpeg or png).

And don't assume that one you've got it validated you can stop checking.
It's very easy for a foreign character or a stray ampersand to slip into a
description somewhere and mess everything up.
Post by Maureen
The content in each of these files could be grabbed using PHP. Can I
use PHP to create a rss file? The file would then have a php extension
- would that cause problems for rss readers?
This shouldn't be a problem. RSS readers shouldn't care what the file
extension is.

Regards
James



Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/rss-dev/

<*> To unsubscribe from this group, send an email to:
rss-dev-unsubscribe-***@public.gmane.org

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Loading...