Author |
Message |
firyace
Joined: 22 May 2006
Posts: 5
|
Posted: Mon May 22, 2006 2:47 am |

|
Hi, A few days ago I have been able to generate rss feeds in php format. However, I don't know how to display it onto my html webpages. I have learnt how to do it with .xml, but how can you do it with .php file type?
Thanks
|
|
|
 
|
 |
Tech Support
Joined: 27 Aug 2004
Posts: 1072
|
Posted: Mon May 22, 2006 10:04 am |

|
|

|
 |
firyace
Joined: 22 May 2006
Posts: 5
|
Posted: Mon May 22, 2006 2:16 pm |

|
Hi thanks for the reply. I have just tried the software, and it works flawlessly with xml extensions, but my problem is that I have a .php extension for my rss feed. I have a .php extension because I am generating feeds that I wrote to be posted on a later date in a randomized manner, but the program that I used generates a php script instead of xml. So is there any other suggestion?
Thanks!
|
|
|
 
|
 |
Tech Support
Joined: 27 Aug 2004
Posts: 1072
|
Posted: Mon May 22, 2006 3:33 pm |

|
Can you post a link to it so I can see what is going on?
Thanks.
|
_________________
FeedForAll Support
|
|

|
 |
MacSupport
Joined: 24 Feb 2005
Posts: 1370
|
Posted: Mon May 22, 2006 5:02 pm |

|
firyace wrote: |
Hi thanks for the reply. I have just tried the software, and it works flawlessly with xml extensions, but my problem is that I have a .php extension for my rss feed. I have a .php extension because I am generating feeds that I wrote to be posted on a later date in a randomized manner, but the program that I used generates a php script instead of xml. So is there any other suggestion?
Thanks! |
What you are probably missing is
Code: |
? ? header("Content-type: application/xml"); |
Jim
|
|
|
 
|
 |
firyace
Joined: 22 May 2006
Posts: 5
|
Posted: Tue May 23, 2006 12:19 am |

|
Quote: |
What you are probably missing is
Code:
header("Content-type: application/xml");
Jim |
Hi Jim, I was just wondering what is this code suppose to do?
Does it just redefine the content as of xml type? But how then can you make the php script print the content into an xml file?
And where do I put the code into?
Should I make it a separate .php file and put it as header or should I put the code straight into an html page and put this code on the top of the php script?
And can I just implement the php script onto an html page?
I have tried to add an .htaccess file with the line:
Code: |
AddType application/x-httpd-php .php .htm .html .shtml |
but when I load up my index.html, it didn't show the feeds at all.
Thanks for the replies!
|
|
|
 
|
 |
MacSupport
Joined: 24 Feb 2005
Posts: 1370
|
Posted: Tue May 23, 2006 12:49 am |

|
Probably we don't understand the question. What are you trying to do? You can display XML in PHP by writing it out just like you would do the write HTML.
Jim
|
|
|
 
|
 |
firyace
Joined: 22 May 2006
Posts: 5
|
Posted: Tue May 23, 2006 3:44 am |

|
Hi, I am trying to put .php feeds onto a html page.
Or, if possible, I want to convert the .php feeds into .xml extension.
Thanks
|
|
|
 
|
 |
MacSupport
Joined: 24 Feb 2005
Posts: 1370
|
Posted: Tue May 23, 2006 10:20 am |

|
firyace wrote: |
Hi, I am trying to put .php feeds onto a html page.
Or, if possible, I want to convert the .php feeds into .xml extension.
Thanks |
What is a .php feed? If you mean a feed that is generated by a URL that ends in .php, then rss2html.php will work just fine.
Jim
|
|
|
 
|
 |
firyace
Joined: 22 May 2006
Posts: 5
|
Posted: Tue May 23, 2006 7:07 pm |

|
Quote: |
What is a .php feed? If you mean a feed that is generated by a URL that ends in .php, then rss2html.php will work just fine.
Jim |
I thought so too, but for some reason it did not work, it generates error code onto my webpage, so I don't know what is going on. However I tried with a feed in the .xml extension and the program worked.
|
|
|
 
|
 |
|