rss feed - Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more
Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Webmaster Tech > Programming > PHP Development

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-13-2007, 03:55 PM   #1 (permalink)
Junior Member
 
Join Date: Oct 2007
Posts: 3
Default rss feed

how do i/where can i find out how to put an rss feed php style onto my website?
talismon is offline   Reply With Quote
Sponsored Links
Old 11-13-2007, 11:22 PM   #2 (permalink)
Junior Member
 
camp185's Avatar
 
Join Date: Nov 2007
Location: San Jose, CA
Posts: 21
Send a message via Yahoo to camp185
Default Re: rss feed

Not sure what you mean, but I have a rss feed that automatically updates every hour by grabbing the new content from a database. I have a cron file tell a php file to write an rss file. I can help you set one up for $50.

Here is a link to it in action: New Polls on APC

I can also make it so you just manually enter data, and when you submit it automatically writes a new rss file.
camp185 is offline   Reply With Quote
Old 11-20-2007, 07:35 AM   #3 (permalink)
Junior Member
 
Join Date: May 2006
Posts: 86
Default Re: rss feed

You can go about it with two different techniques.

Output XML by having your feed be called like http://example.com/rss.php

You will want to add a header before you output any data so that your php file will be treated as an xml file. Your script will start with something like this:
header("Content-type: text/xml");
echo '<?xml version="1.0"?>';

The other preferred way is to actually create an example file that would be called like http://example.com/rss.xml. This is preferred as some RSS readers will not recognize the .php extension. To create the file just make sure your rss.xml file is writable, once again you will start off like this:

$rss = <?xml version="1.0"?>';
//Finish your complete RSS file here
if(is_writable('rss.xml')){
if(!$handle = fopen('rss.xml', 'w')){
echo "Unable to open or create RSS file";
exit();
}
if(fwrite($handle, $rss) === false){
echo "Unable to write to RSS file";
exit();
}
echo "You successfully created the RSS file
fclose($handle);
}

Hope this helps to get you started.
etono is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 05:08 PM.


Powered by vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.2
Webmaster Forums
Web Hosting | Chicago Web Hosting | Web Hosting