Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-08-2006, 01:57 PM
dirkfirst dirkfirst is offline
Programming Professional
 
Join Date: May 2006
Posts: 338
Rep Power: 12
dirkfirst is on a distinguished road
Default Output rss

How do I output RSS?

I've created a project like:

PHP Code:
<?php

// Print our RSS
print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n\n";
print 
"<!DOCTYPE rss PUBLIC \"-//Netscape Communications//DTD RSS 0.91//EN\" \"http://my.netscape.com/publish/formats/rss-0.91.dtd\">\n";
print 
"<rss version=\"0.91\">\n";
print 
"        <channel>\n";
print 
"            <title>Text Ads</title>\n";
print 
"            <description>Ads</description>";
print 
"            <language>en</language>\n";

?>
But it doesn't show up in XML format when I load the webpage. Anyone know why?
__________________
DirkFirst

Last edited by dirkfirst; 09-08-2006 at 01:59 PM. Reason: Slashes don't show up before " but they are there
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 09-08-2006, 07:44 PM
TkTech TkTech is offline
 
Join Date: Jun 2006
Posts: 992
Last Blog:
Having trouble with yo...
Rep Power: 20
TkTech is on a distinguished road
Send a message via MSN to TkTech
Default

your missing the endings for one thing, such as </channel>, which creates invalid xml anyways.

Try looking at http://www.xul.fr/en-xml-rss.html which is a great site for creating rss feeds, its where I learned from.

Whenever I need to use RSS for output, I use RSSWriter.
http://usefulinc.com/rss/rsswriter/

Very handy and easy to use, expecialy for large sites/projects.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-13-2006, 10:08 AM
dirkfirst dirkfirst is offline
Programming Professional
 
Join Date: May 2006
Posts: 338
Rep Power: 12
dirkfirst is on a distinguished road
Default

Well, I do have the ending tags but I didn't post all of the code.

I'll take a look at the rsswriter. What I've done so far seems to be read fine by other XML readers. No idea why it doesn't show up properly in the browser.
__________________
DirkFirst
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-27-2006, 08:44 PM
Nightracer's Avatar   
Nightracer Nightracer is offline
Programmer
 
Join Date: Jun 2006
Posts: 131
Rep Power: 9
Nightracer is on a distinguished road
Default

Looks fine to me. What were you using to test it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-03-2006, 07:06 PM
dirkfirst dirkfirst is offline
Programming Professional
 
Join Date: May 2006
Posts: 338
Rep Power: 12
dirkfirst is on a distinguished road
Default

I was just going to the URL in FireFox. FF loads up rss differently but it wouldn't load mine that way. In the end, RSS readers read the data fine though. Not sure what the problem here was.
__________________
DirkFirst
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No download but error Jeroen66 ionFiles 11 06-27-2007 08:42 AM
assembly code help emaney General Programming 0 06-16-2007 05:27 AM
checking types - ANSI C navghost C and C++ 3 05-15-2007 08:46 AM
A small problem in the output The_Master C and C++ 3 12-13-2006 01:04 PM


All times are GMT -5. The time now is 04:20 PM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 98%

Ads