View previous topic :: View next topic |
Author |
Message |
dodo
Joined: 25 Jan 2002 Posts: 35
|
Posted: Thu Jun 26, 2003 9:11 pm Post subject: do know you how b2 does its rss? |
|
|
hi for those who have experience with xml. do you know how b2 manages to allow a xml file to have a php extension? i tried to find it out from the source but i haven't figured it yet. if you know anything, please drop me a line thanks. _________________ http://pure-essence.net
b2 rocks |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Fri Jun 27, 2003 2:34 am Post subject: |
|
|
Hi dodo,
There was a time, which I'm sure you remember, when b2 created the rss/xml file when updates/post were done. A number of issue came up in the area of file overwrites, multiple users, etc.
So Michel V took a different approach. B2 creates the rss/xml feed when it is needed through the use of one of two php scripts. Thus when an access is made to b2rss.php or b2rss2.php a rss/xml file is generated.
[This reminds me we should remove the b2rss.xml file from the distribution, it is not longer used.] _________________ Kind Regards,
Michael e |
|
Back to top |
|
 |
dodo
Joined: 25 Jan 2002 Posts: 35
|
Posted: Fri Jun 27, 2003 4:46 am Post subject: |
|
|
i understand that b2rss only gets generated when it's called. i did read its code. what i can't figure out is how come it's not b2rss.xml.. i tried quite a few things to make my own xml file to end with .php, but it just won't show as a xml formatted file, you know what i mean? _________________ http://pure-essence.net
b2 rocks |
|
Back to top |
|
 |
macshack
Joined: 17 Jul 2002 Posts: 1204 Location: Phoenix, Az
|
Posted: Fri Jun 27, 2003 6:00 am Post subject: |
|
|
hi dodo
dodo wrote: | i understand that b2rss only gets generated when it's called. i did read its code. what i can't figure out is how come it's not b2rss.xml..
|
because the two files (b2rss.php and b2rss2.php) are php code files. Please don't take that as a smart a** comment, I'm just trying to understand. For the server to interpret the file as php code, it has to have a .php extension (or something defined in the server to associate it with the PHP interpreter.) If it was .xml, would not the serer just return the file to the requestor?
Quote: | i tried quite a few things to make my own xml file to end with .php, but it just won't show as a xml formatted file, you know what i mean? |
I guess I don't understand, and it's most likely me. Why would you want an xml file (I'm assuming a true xml structured content) with a .php extension?
I must admit I am confused. _________________ Kind Regards,
Michael e |
|
Back to top |
|
 |
dodo
Joined: 25 Jan 2002 Posts: 35
|
Posted: Fri Jun 27, 2003 3:12 pm Post subject: |
|
|
macshack wrote: | hi dodo
dodo wrote: | i understand that b2rss only gets generated when it's called. i did read its code. what i can't figure out is how come it's not b2rss.xml..
|
because the two files (b2rss.php and b2rss2.php) are php code files. Please don't take that as a smart a** comment, I'm just trying to understand. For the server to interpret the file as php code, it has to have a .php extension (or something defined in the server to associate it with the PHP interpreter.) If it was .xml, would not the serer just return the file to the requestor?
|
well you answered your second question with your explanation in your first part. the exact reason i want my xml to end with .php is just like b2rss.php coz i want to use php & mysql in it. _________________ http://pure-essence.net
b2 rocks |
|
Back to top |
|
 |
|