corsasport.co.uk
 

Corsa Sport » Message Board » Off Day » Geek Day » XML/PHP » Post Reply

Post Reply
Who Can Post? All users can post new topics and all users can reply.
Icon:
Formatting Mode:
Normal
Advanced
Help

Insert Bold text Insert Italicized text Insert Underlined text Insert Centered text Insert a Hyperlink Insert Email Hyperlink Insert an Image Insert Code Formatted text Insert Quoted text
Message:
HTML is Off
Smilies are On
BB Code is On
[img] Code is On
Post Options: Disable smileys?
Turn BBCode off?
Receive email notification of new replies?

Ian

posted on 26th Apr 07 at 15:03

Worth noting that it was a bit of a hack and doesn't probably conform to any specs, I just looked at some other feeds and made mine the same.


Laney

posted on 26th Apr 07 at 14:10

Awesome :) Thanks Ian.


Ian

posted on 26th Apr 07 at 00:35

Check the source of this

http://www.corsasport.co.uk/board/rssads.php

Thats just a regular database query but instead of printing HTML code around the data its got RSS XML.

I can give you the PHP source to that if you want but there really was no science bit, just header() and the echos in the right places.

[Edited on 26-04-2007 by Ian]


Ian

posted on 26th Apr 07 at 00:32

Can you not just use the header() function?

You're just spoofing the MIME type, right? Apologies if there is more to it that I'm missing but that would be my starting point.


Laney

posted on 25th Apr 07 at 21:49

That looks a bit complicated :|

For future reference, this was just what I was looking for: http://www.builderau.com.au/program/php/soa/Dynamic-XML-document-construction-with-the-PHP-DOM/0,339028448,339273222,00.htm :look: Stupid google :mad:


James

posted on 25th Apr 07 at 21:38

SQL can output in XML directly without using PHP.

http://www.topxml.com/sql/for_xml_explicit.asp


Laney

posted on 25th Apr 07 at 21:37

Am I right in thinking that you can't parse XML to the browser using PHP?

Basically I want to output data from a database into an XML format instead of regular HTML. I've googled it but the only suggestion is to create a new XML document each time. Is this the way I should be thinking?

:)