473,324 Members | 1,678 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,324 software developers and data experts.

Tool to build RSS feed?

Hello

I'm not an expert on RSS, and I'd like to find a tool to make
it easy to create an RSS feed for a site whenever a new row is created
in a MySQL database.

Is there some PHP tool that would make this easy to do?

Thank you.
May 29 '07 #1
10 1740
On May 29, 2:55 pm, Gilles Ganault <nos...@nospam.comwrote:
Hello

I'm not an expert on RSS, and I'd like to find a tool to make
it easy to create an RSS feed for a site whenever a new row is created
in a MySQL database.

Is there some PHP tool that would make this easy to do?

Thank you.
Google it :o)

Making an RSS feed is easy - there are plenty of templates out there.
All you need to do to create a dynamic RSS feed is to write a PHP file
and make it call to the database to get the required data and output
XML headers and then follow the template.

Or if you think that's lame - you can generate a new XML file
everytime something new is added to the database.

May 29 '07 #2
On 29 May 2007 15:16:23 -0700, SterLo <st***************@gmail.com>
wrote:
>Google it :o)
I obviously did, and stumbled on two.. that didn't work :-/ One of
them is feed.class, which I downloaded from

http://svn.sourceforge.net/viewvc/de...ss?view=markup

//Fatal error: Call to undefined function get_branding()
$r.= sprintf("\t\t<generator>%s</generator>\n",
htmlentities(get_branding(FALSE)));
>Making an RSS feed is easy - there are plenty of templates out there.
All you need to do to create a dynamic RSS feed is to write a PHP file
and make it call to the database to get the required data and output
XML headers and then follow the template.
Is there a template you would recommend?

BTW, do I create a new file with new items instead of appending them
to older items?

Thank you.
May 29 '07 #3
Gilles Ganault wrote:
http://svn.sourceforge.net/viewvc/de...ss?view=markup

//Fatal error: Call to undefined function get_branding()
$r.= sprintf("\t\t<generator>%s</generator>\n",
htmlentities(get_branding(FALSE)));
That's my feed class -- eek! I didn't know that Feed.class called the
"get_branding" function -- I thought it was reasonably independent of
the rest of demiblog. I'll make changes ASAP to remove this dependency.

In the mean time, I recommend creating a function get_branding like this:

function get_branding () { return "Your Site Name"; }

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 95 days, 15:44.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/0...tive-surnames/
May 30 '07 #4
Gilles Ganault wrote:
//Fatal error: Call to undefined function get_branding()
Fixed now -- just download a new copy.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 95 days, 15:53.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/0...tive-surnames/
May 30 '07 #5
..oO(Toby A Inkster)
>Gilles Ganault wrote:
>http://svn.sourceforge.net/viewvc/de...ss?view=markup

//Fatal error: Call to undefined function get_branding()
$r.= sprintf("\t\t<generator>%s</generator>\n",
htmlentities(get_branding(FALSE)));

That's my feed class -- eek! I didn't know that Feed.class called the
"get_branding" function -- I thought it was reasonably independent of
the rest of demiblog. I'll make changes ASAP to remove this dependency.
Is that called remote debugging? ;)

Micha
May 30 '07 #6
Michael Fesser wrote:
Is that called remote debugging? ;)
I suppose so, though I doubt Usenet would be a suitable communication
channel if the remote debugging were to be mechanised.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.12-12mdksmp, up 95 days, 18:30.]

Non-Intuitive Surnames
http://tobyinkster.co.uk/blog/2007/0...tive-surnames/
May 30 '07 #7
On Tue, 29 May 2007 23:55:53 +0200, Gilles Ganault <no****@nospam.com>
wrote:
>Is there some PHP tool that would make this easy to do?
Apparently, it's not that complex, and I just need to create a text
file that looks like this:

=================
<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
<channel>
<title>My Dummy Channel</title>
<link>http://localhost/dummy.xml</link>
<description>Some dummy channel</description>
<!--pubDate>Wed, 30 May 2007 15:30:15 CEST</pubDate-->
<item>
<title>Some dummy title</title>
<link>http://localhost/1.html</link>
<pubDate>Wed, 30 May 2007 18:15:19 CEST</pubDate>
<guid>http://www.sortirsurparis.net/sortie_read.php?13521</guid>
<description>Some <a
href="http://localhost/1.html">link</a>.</description>
</item>
</channel>
</rss>
=================

=Although it's not PHP-related... I have a couple of questions:

1. Do I have to update the Channel's <pubDatevery time I add an item
in the file for RSS clients to notice that it was updated, or do RSS
clients parse the whole file and read each item's pubDate to tell if
they know about it?

2. Do RSS clients keep track of items they know about, so that I don't
need to keep more than today's items in the file (just for readers who
only check this RSS feed when they come home)?

Thank you.
May 30 '07 #8
On Wed, 30 May 2007 20:51:59 +0200, Gilles Ganault <no****@nospam.com>
wrote:
>Apparently, it's not that complex, and I just need to create a text
file that looks like this:
For those interested, it can be even simpler:

<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
<channel>

<title>My Dummy Channel</title>
<link>http://www.acme.com/rss.xml</link>
<description>Some dummy channel</description>

<item>
<title>Test</title>
<link>http://www.acme.com/article.php?123</link>
<description>A basic description</description>
<guid isPermaLink="false">123</guid>
</item>

</channel>
</rss>

Items can even have the same title: Just incrementing GUID is enough
for RSS clients to tell new items from old ones.

HTH,
May 30 '07 #9
I told you it wasn't hard :op

May 31 '07 #10
On 31 May 2007 07:33:18 -0700, SterLo <st***************@gmail.com>
wrote:
>I told you it wasn't hard :op
Yup :-)
Jun 1 '07 #11

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

Similar topics

3
by: _andrea.l | last post by:
how to build a interfaces (or web pages) in easy way? how to build a form in easy way? how to automate and create web pages whit a tool? which tool to use to create form for a database? I mean...
2
by: the_ainbinders | last post by:
Anything like this around anywhere? Need to be able to input RSS information for several feeds and have it create an OMPL file. TIA, Rob
8
by: ted | last post by:
How does the speed of the Scons build tool compare with Ant? Right now with out Ant builds take around an hour. Hoping to speed that up. TIA, Ted
3
by: Eric Chong | last post by:
I have been trying to automate our builds using BuildIt tool available from Microsoft. This tool only log whether build is success or fail. Since all developers would like to see what the build...
2
by: Soundneedle | last post by:
I have code that loops through a record set, which build an outlook email's body. The problem is, I don't know how to "build" the .body while in the loop without resetting the .body's value to the...
1
by: Jose | last post by:
Hi, Our small company is growing quickly, and we need a source control and build tool for all our c# .net code. For build tool, i was thinking Nant. For source control, i was thinking...
5
by: sh | last post by:
I am working on a database project, and I'm trying to think "objectively". Are there any tools that will map my "objects" to relational tables? I'd prefer a freebie, or something faily low-cost to...
26
by: webrod | last post by:
Hi, I have some php pages with a lot of HTML code. I am looking for a HTML validator tool (like TIDY). TIDY is not good enough with PHP tags (it removes a lot of php code). Do you have any...
6
by: Hussein B | last post by:
Hi. Apache Ant is the de facto building tool for Java (whether JSE, JEE and JME) application. With Ant you can do what ever you want: compile, generate docs, generate code, packing, deploy,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.