473,327 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

code to generate RSS feeds

Hi,

I'm using PHP 4.4.4 with Apache 2.2. I'm looking for recommendations
on free code I can use to generate RSS feeds. I found FeedCreator
though Google, but that is terrible. It cannot output dates correctly
and it displays a bunch of warnings/notices, even though I never
touched their code.

Thanks for your advice, - Dave

Feb 12 '07 #1
4 1660
NC
On Feb 12, 9:21 am, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
>
I'm using PHP 4.4.4 with Apache 2.2. I'm looking for recommendations
on free code I can use to generate RSS feeds. I found FeedCreator
though Google, but that is terrible. It cannot output dates correctly
and it displays a bunch of warnings/notices, even though I never
touched their code.
A few months ago, I posted to alt.php on a simlar topic:

http://groups.google.com/group/alt.p...c1bd3503d5b0f5

If you have any questions after reading that post, shoot me an e-
mail.

Cheers,
NC

Feb 13 '07 #2
la***********@zipmail.com wrote:
I'm using PHP 4.4.4 with Apache 2.2. I'm looking for recommendations
on free code I can use to generate RSS feeds.
Here's the class I use for my current project.
http://svn.sourceforge.net/viewvc/*c...e=text%2Fplain

It's uses PHP 5, but it should be reasonably simple to backport to PHP 4.

Basic technique is:

<?php
require_once 'Feed.class';
$type = 'rss';

$feed = Feed::factory($type);
$feed->title = 'Example';
$feed->url = 'http://example.com/';
$feed->summary = '<p>Here is <b>my</bsite. It is nice.</p>';
$feed->langguage = 'en_GB';
$feed->add_item('Article 1',
'http://example.com/articles/1',
'<p>Article 1 is lovely.</p>');
$feed->add_item('Article 2',
'http://example.com/articles/2',
'<p>Article 2 is even <b>better!</b>.</p>');
$out = $feed->output();

header("Content-Type: text/xml");
print $out;
?>

It supports:

- RSS 0.91
- RSS 1.0 (RDF)
- RSS 2.0 (with or without HTML descriptions)
- Atom 1.0 (with or without HTML descriptions)
- HTML/hCalendar
- iCalendar
- JSON
- PHP serialize()
- Text (CSV)

as output formats. It is reasonably easy to add support for other formats.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
Feb 13 '07 #3
Hello,

on 02/12/2007 03:21 PM la***********@zipmail.com said the following:
I'm using PHP 4.4.4 with Apache 2.2. I'm looking for recommendations
on free code I can use to generate RSS feeds. I found FeedCreator
though Google, but that is terrible. It cannot output dates correctly
and it displays a bunch of warnings/notices, even though I never
touched their code.
You may want to take a look at this popular RSS feed generation class.
It supports generating feeds in either RSS 0.9, 0.91, 1.0 and 2.0:

http://www.phpclasses.org/rsswriter

You need to use it in conjunction with this other class:

http://www.phpclasses.org/xmlwriter

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Feb 14 '07 #4
On Feb 13, 9:59 pm, Manuel Lemos <mle...@acm.orgwrote:
Hello,

on 02/12/2007 03:21 PM laredotorn...@zipmail.com said the following:
I'm using PHP 4.4.4 with Apache 2.2. I'm looking for recommendations
on free code I can use to generate RSS feeds. I found FeedCreator
though Google, but that is terrible. It cannot output dates correctly
and it displays a bunch of warnings/notices, even though I never
touched their code.

You may want to take a look at this popular RSS feed generation class.
It supports generating feeds in either RSS 0.9, 0.91, 1.0 and 2.0:

http://www.phpclasses.org/rsswriter

You need to use it in conjunction with this other class:

http://www.phpclasses.org/xmlwriter

I've used Manuel Lemos's classes, and I like them a great deal. they
are clean and easy to use.

-- Lawrence Krubner
http://www.accumulist.com/

Apr 3 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: plazma_41 | last post by:
Are there any uses for rss feeds on commercial websites selling products/services? Yes! I've just realized that eMaximarket Auctions ( http://www.emaximarket.com ) provides RSS feeds. For...
1
by: richards1052 | last post by:
I am setting up a forum website at which I plan to set up a news aggregator to pick up news headlines about the Mideast. But I've only been able to find a few news resources that have specific...
8
by: Paul Cochrane | last post by:
Hi all, I've got an application that I'm writing that autogenerates python code which I then execute with exec(). I know that this is not the best way to run things, and I'm not 100% sure as to...
14
by: TT (Tom Tempelaere) | last post by:
Hi people, The code that follows throws an ExecutionEngineException. This was written in C# (Microsoft Visual C# .NET 69462-335-0000007-18823) using MSDE 7.1 (7.1.3088). The framework is .NET...
0
by: jmwatte | last post by:
OK... 2 RSS feeds ... "http://feeds.feedburner.com/brainyquote/QUOTENA" "http://feeds.feedburner.com/qotd" Now I build a RSS reader in C#Express(did several of them including the starterkit)...
2
by: dkode | last post by:
I built an asp.net usercontrol that consumes rss feeds that I specify the url for. Some of them (MVP blogs, google news) consumes the feeds just fine. and other times (75%) it chokes on...
5
by: Shawn | last post by:
Hi, I want to understand and follow RSS feed because many web pages provide RSS feed for updated new data(e.g. http://www.weather.gov/rss/). But I never get how to use it. The link below suppose...
1
by: Rama Jayapal | last post by:
hi i am developing a web application where i have to read multiple XML feeds amd store their values to database but i require the same type of fields from multiple XML feeds like for...
3
by: Tony Johansson | last post by:
Hello! I'm reading in a book and it says the following. "MSIL(Microsoft Intermediate Language) generated by all the .NET language compilers. This is a common standard for the binary code...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.