473,398 Members | 2,212 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,398 software developers and data experts.

if i am able to understand RSS right or no ?

realin
254 100+
hi guys,

I want to know how can i add RSS to my website ? cause they say without RSS your site is dead :P hehehe

I read few article online and wat i could jot up is that, we have to make a XML file with the five mandatory fields rss version,channel,title,link,description and link this file anywhere on your webpage from where the users copy the link and feed it to their RSS reader apps or utltilities.

So it can have any XML file name ? And it can be placed anywhere in the website ? and how do i dynamically make the .xml page, just like we do it in html pages ? is it so ?

Please let me know if there is some tutorial which teaches to create a RSS file with php, without having to use the third party class file or anything ..

thanks :)
Oct 21 '07 #1
7 1386
pbmods
5,821 Expert 4TB
Heya, Realin.

The key element to making RSS-aware browsers is by using the link tag:

Expand|Select|Wrap|Line Numbers
  1. <link rel="alternate" type="application/rss+xml" title="Title of the News Feed" href="http://yourdomain.tld/path/to/feed.rss" />
  2.  
Oct 21 '07 #2
realin
254 100+
Heya, Realin.

The key element to making RSS-aware browsers is by using the link tag:

Expand|Select|Wrap|Line Numbers
  1. <link rel="alternate" type="application/rss+xml" title="Title of the News Feed" href="http://yourdomain.tld/path/to/feed.rss" />
  2.  
hey pbmods,

thanks for the reply, you are always the one to reply my twisted question(which are twisted for me but simple for you).

I am unable to workaround with RSS. Suppose i make a php file in which a complete RSS like file is create but, how do i make it XML ??
i have got three parts in this whole RSS thing

1) PHP file, which fetches data from database and makes the feed, it includes <? xml ?> etc etc everything

2) XML file, which is actually reached by the RSS reader when given a link like.
[HTML]<a href='rss.xml'>Read RSS</a>
[/HTML]
3) the file in which i will put this link(above mentioned)..

but how do i go with it ? if i create a file with PHp then shall is store it ? that is not the way it is suppose to be i guess ..

please help thanks :)
Oct 21 '07 #3
pbmods
5,821 Expert 4TB
Heya, Realin.

Check out this article.

If you generate the RSS feed using PHP, be sure to set the content type:

Expand|Select|Wrap|Line Numbers
  1. header('Content-Type: application/rss+xml; charset=utf-8');
  2.  
Oct 21 '07 #4
realin
254 100+
hey thanks for the reply.. i went thru the above mentioned article, but it shows to create a static RSS page.. i got something like i wanted.. here

http://www.phpfreaks.com/tutorials/139/0.php

i gonna read both of them and if i face some problem.. i will letcha know..
cheers !!
u rock :)

**********EDIT***********************

one question waht should be the extension of the rss ? is it more likely to be rss or xml ? cause i read somewhere and tehy say the feeds which come from .xml file are more penetrable than other files... is it so ?

now when i will have a php file geenrating a random feed page for me and in the end i will have this lines, then it sure gonna generate RSS for me

[PHP]header("Content-type: application/xml; charset='ISO-8859-1'");[/PHP]


So that means the link for users should click should be something like this

[HTML]
<link rel="alternate" type="application/rss+xml" title="Title of the News Feed" href="feed.php" />[/HTML]

am i right ? but .php seems to be ODD and incorrect
Oct 21 '07 #5
pbmods
5,821 Expert 4TB
Heya, Realin.

You could give the file a .xml or .rss extension and then add an .htaccess file to the same directory as that file.

The .htaccess file would have this line in it:
Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .xml (or .rss, whichever you use)
  2.  
Oct 21 '07 #6
realin
254 100+
there is a another way in whcih XML files can be parsed as php, is this the right way to do ?

http://www.tiffanybbrown.com/2005/12...sql-and-apache
Oct 21 '07 #7
realin
254 100+
Heya, Realin.

You could give the file a .xml or .rss extension and then add an .htaccess file to the same directory as that file.

The .htaccess file would have this line in it:
Expand|Select|Wrap|Line Numbers
  1. AddType application/x-httpd-php .xml (or .rss, whichever you use)
  2.  
hey thanks.. for the above.. i will use that .htacces trick :)

thanks :)
Oct 21 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: BoonHead, The Lost Philosopher | last post by:
I think the .NET framework is great! It's nice, clean and logical; in contradiction to the old Microsoft. It only saddens me that the new Microsoft still doesn't under stand there own...
14
by: Kay Schluehr | last post by:
One of the main reasons Pythons anonymous function lambda is considered to be "broken" is Pythons disability to put statements into expressions and support full functionality. Many attempts to...
13
by: Terry Andersen | last post by:
Could anyone please help me understand what is going on in the code below. A short explanation would be nice..... Best Regards Terry struct mystruct { unsigned char testchar; unsigned short...
7
by: tuchka | last post by:
Hi, guys! I am very new here and just started to learn C. I have previous java exp. however. I'm abs. stuck on pointers and i'm unable comprehend algorithm of simple program that reverses chars...
9
by: Rajat Tandon | last post by:
Hello there, I am relatively new to the newsgroups and C#. I have never been disappointed with the groups and always got the prompt replies to my queries.This is yet another strange issue, I am...
0
by: Alan Silver | last post by:
Hello, Sorry for the long post, but I want to try and explain it clearly... I'm using webparts for (possibly) an unusual scenario, and I'm having problems. This could be because I'm doing...
9
by: arnuld | last post by:
hai folks, well, it's me again and again, i am asking questions. anyway, with your help i have finalised that i will start learning c++ (as you told me that i do not need to know any OO language...
2
by: xianwei | last post by:
First, typedef struct pair { Node *parent; Node *child; } Pair; static Pair SeekItem(cosnt Item *pI, const Tree *pTree) { Pair look;
6
by: CD1 | last post by:
#include <string> This code won't compile. There is no variable called "foo2". :)
1
by: Francesco Bochicchio | last post by:
Il Mon, 18 Aug 2008 12:15:10 +0100, dudeja.rajat ha scritto: Uhm, I don't think you should use the grid manager to obtain a window like that. The grid manager is for equally distributing...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.