473,545 Members | 2,019 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help on integrating RSS in site done in php

hi guys,

i want to have rss on my site and the page is written in php
(mypage.php). what are the things i need? how to start to with it?

pls help..
tnx

Apr 30 '07 #1
1 1555
shotokan99 wrote:
i want to have rss on my site and the page is written in php
(mypage.php). what are the things i need? how to start to with it?
Try my feed library...

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

Example of usage:

<?php

// This file is called "http://example.com/feed.xml"

// Load up the Feed library.

require 'Feed.class';

// Create a new feed.

$f = Feed::factory(
'rss2',
'Example.com News',
'http://example.com/feed.xml',
'All the latest news and greatest views from Example.com',
'en' #English
);

// You would normally want to read your news from a database and
// add each item to the feed. However, for simplicity I'll add a
// couple of news items without using a database.

$f->add_item(
'EXMP Shares Reach Record High',
'http://example.com/news/2007/share-price',
'News of the new chairman reached Wall Street and EXMP shares...',
'en',
array('article_ date'=>strtotim e('Today'))
);
$f->add_item(
'New Chairman of ExampleCorp Elected',
'http://example.com/news/2007/chairman',
'Joe Bloggs has been elected president of ExampleCorp...' ,
'en',
array('article_ date'=>strtotim e('Yesterday'))
);

// Now we just need to output the feed.

header("Content-Type: application/rss+xml");
print $f->output();

?>

The library also allows you to produce Atom, iCalendar, RDF and various
other feed formats for very little extra effort.

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

* = I'm getting there!
Apr 30 '07 #2

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

Similar topics

2
2798
by: news | last post by:
We're being asked to get Quickbooks Enterprise edition for our business. We use a completely hand-made online store (PHP and mySQL) and used to simply create CSV sheets that were imported as invoices into regular Quickbooks. But I guess that's neither 100% accurate and may not even be doable in newer Quickbooks. We want to be able to...
1
3113
by: chuck | last post by:
Hi, I would first like to apologize as i am new to xml and am sure i don't fully understand the concepts/language. I am creating a web site to sell items i make. I want to dynamically create the page for each item based on mysql data that i have stored about each item. I have an html page with a css that i would like to use as the backdrop...
12
2571
by: Woodster | last post by:
I currently have some code for an application that is running on Win32. I have tried to keep anything not directly gui related as separate as possible for portability reasons, including file access. Now has come the time to try and implement the program on a Windows CE platform. Problem is, that the MFC CArchive class uses an integer file...
1
1005
by: Andy | last post by:
Hi all, I have a few custom Dlls that I am building here and an automated build / deploy. Ideally, I'd like to integrate the help generated by NDoc during a build into our Studio deployments... So what I'd like to do is install the help file so that its a Url that the deploy scripts will drop an updated version of the help into, so
1
460
by: Nexus | last post by:
I've heard people saying that it can be done (Integrating Flash actionscript into ASP .Net apps ???) - does anyone have a lead on where I might find a coding sample or additional info
2
1416
by: George Durzi | last post by:
I'd like to get some real world feedback from developers out there who have to work with the "design" folks to integrate look and feel stuff into a vs.net web project. A lot of designers use web page design specific products such as Macromedia Dreamweaver when building sites. What happens when you as a vs.net developer have to work with a...
1
1428
by: LP | last post by:
Hello, I am thinking about developing an application on my own free time (web or maybe even windows client) that watches eBay listings, places last seconds winning bids, etc. I am sure someone has already thought of this or done it. Is there any Web Services for this purpose. I looked on Ebay site, but could not find any mentions of any...
0
1059
by: johndparker | last post by:
Hi, I have a ASP.NET web application I distribute precompiled (without source code) to clients. This can be run as a standalone web app but I would also like the option of the client integrating it into their ASP.NET web app so they both share the same ASP.NET Session. Does anyone know how this should be done? I've tried a few things:...
1
336
by: shotokan99 | last post by:
hi guys, i want to have rss on my site and the page is written in php (mypage.php). what are the things i need? how to start to with it? pls help.. tnx
0
7401
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7808
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7423
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5329
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3450
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3443
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1014
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.