php-general Digest 12 Jan 2009 14:00:39 -0000 Issue 5897

Topics (messages 286062 through 286084):

Re: Couple of beginner questions
        286062 by: John Corry
        286063 by: Paul M Foster
        286065 by: Peter Ford
        286066 by: Peter Ford
        286067 by: Nathan Rixham
        286068 by: Nathan Rixham
        286069 by: Nathan Rixham
        286070 by: Nathan Rixham

php_value error_log realtive path in 5.2.8
        286064 by: Andre Hübner
        286071 by: Nathan Rixham
        286072 by: Nathan Rixham
        286083 by: Nathan Rixham

Re: RSS feeder in PHP5?
        286073 by: Richard Heyes
        286074 by: Richard Heyes
        286075 by: clive
        286076 by: Craig Whitmore
        286077 by: Nathan Rixham
        286078 by: Nathan Rixham
        286079 by: Nathan Rixham
        286080 by: Richard Heyes
        286081 by: Nathan Rixham
        286082 by: Richard Heyes
        286084 by: Michelle Konzack

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
One of the best things that ever happened to me (with regards to
writing PHP) was deciding not to embed it in HTML anymore.

I either:
a) generate the HTML from classes I've built (HTML, Forms, Tables,
Images, etc) or use an equivalent PEAR class

- or -

b) Use Smarty templates...in which I still generate the HTML that will
go to the template (where required) with the HTML generation classes.

The advantages are abundant.

I can't imagine having to maintain some of the code I saw in the
examples above. My favorite WTF was with this snippet:

$imgHTML = '<img src="' . $url . '" alt="' . $alt . '" title="' . $alt
. '" class="' . $imgclass . '" />';

Holy crap...REALLY!?

All that string concatenation and there's not even width/height
attributes in there!

That would look like:

$i = new Image('path/to/image/file');
$i->__set(array('class'=>$imgClass, 'alt' => $altText));
$i->toHtml();

Being able to change every image tag in a site by editing the
class/method that created is just too big an advantage not to use. Not
to mention the auto-generated width/height attributes, the ability to
auto-produce thumbnails and fullsize images from a single file...

After struggling through the beginnings, I wrote classes to generate
basic HTML elements, then tables, then forms, then images.

It saved me a bunch of time and taught me to see the website as an
application...not as a web-page with pieces of data in it.

Somehow, coming to that bit of knowledge was very helpful to my life
as a programmer.

Good luck,

John Corry

--- End Message ---
--- Begin Message ---
On Mon, Jan 12, 2009 at 12:04:15AM -0500, John Corry wrote:

> One of the best things that ever happened to me (with regards to
> writing PHP) was deciding not to embed it in HTML anymore.
> 
> I either:
> a) generate the HTML from classes I've built (HTML, Forms, Tables,
> Images, etc) or use an equivalent PEAR class
> 
> - or -
> 
> b) Use Smarty templates...in which I still generate the HTML that will
> go to the template (where required) with the HTML generation classes.
> 
> The advantages are abundant.
> 
> I can't imagine having to maintain some of the code I saw in the
> examples above. My favorite WTF was with this snippet:
> 
> $imgHTML = '<img src="' . $url . '" alt="' . $alt . '" title="' . $alt
> . '" class="' . $imgclass . '" />';
> 
> Holy crap...REALLY!?
> 
> All that string concatenation and there's not even width/height
> attributes in there!
> 
> That would look like:
> 
> $i = new Image('path/to/image/file');
> $i->__set(array('class'=>$imgClass, 'alt' => $altText));
> $i->toHtml();
> 
> Being able to change every image tag in a site by editing the
> class/method that created is just too big an advantage not to use. Not
> to mention the auto-generated width/height attributes, the ability to
> auto-produce thumbnails and fullsize images from a single file...
> 
> After struggling through the beginnings, I wrote classes to generate
> basic HTML elements, then tables, then forms, then images.
> 
> It saved me a bunch of time and taught me to see the website as an
> application...not as a web-page with pieces of data in it.
> 
> Somehow, coming to that bit of knowledge was very helpful to my life
> as a programmer.

I've written a lot of code like the original example above, and still
do, but I see your point, since I've written code like yours too. I
write all my PHP code (and I write a *lot* of it) solo, with no help and
no collaborators. But as I understand it from a lot of framework types,
the ideal is to set up the HTML so that a HTML coder can understand
what's going on, without having a lot of PHP weirdness in it. Meaning,
if you're going to infuse your HTML with PHP, you should do it in a
minimalistic way. It'd be a helluva lot easier on me to do it all
through PHP classes, though.

I also come from a C background, and I recognize significant differences
between the paradigm for C programs and HTTP-based coding. Considering
that every PHP "program" paints generally a single page, I'm not a fan
of loading up 14 support files every time I load a page of HTML. That's
why I don't use one of the MVC frameworks available in the FOSS world.
CodeIgniter, which is one of the lightest weight frameworks, opens
something like 17 files before it paints a single byte in the browser.
The upshot is that I don't like to use a lot of libraries scattered in a
variety of files to render HTML/PHP pages.

But here's a question for those of you who work in a collaborative
environment-- are you really ever in a situation where some HTML weenie
is coding HTML pages and you're somewhere else doing the PHP work? Or is
that some academic's view of the way things *should* be done?

Paul
-- 
Paul M. Foster

--- End Message ---
--- Begin Message ---
Paul M Foster wrote:
(snip)
> But here's a question for those of you who work in a collaborative
> environment-- are you really ever in a situation where some HTML weenie
> is coding HTML pages and you're somewhere else doing the PHP work? Or is
> that some academic's view of the way things *should* be done?
> 
> Paul

Yup, been there in a mid-sized web agency a few years ago, although with
Java/JSP rather than PHP. The sensitive types drew the pretty pictures on their
Macs, passed the design to the HTML hackers who broke the pretty pictures into
sprawling arrays of table cells and image fragments, then passed the HTML to the
Java teams (me and others) who had to slot in the logic without spoiling the
pretty pictures. Then the sensitive types would see a pixel out of place and the
HTML hackers would have to carefully navigate the logic sections and tweak the
tables to make it look right again.
It certainly focuses the mind about separating logic and presentation. In the
end most of the JSP was done with JSP tag libraries, so that the HTML hackers
were not too distracted by scary Java code.
It actually all worked quite well, and produced some really beautiful web sites
AND really elegant code libraries.
But then the dot-com thing all fell over and it was too expensive for most
people to pay for three teams and a couple of managers just to build a web 
shop...


-- 
Peter Ford                              phone: 01580 893333
Developer                               fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent

--- End Message ---
--- Begin Message ---
Paul M Foster wrote:
(snip)
> But here's a question for those of you who work in a collaborative
> environment-- are you really ever in a situation where some HTML weenie
> is coding HTML pages and you're somewhere else doing the PHP work? Or is
> that some academic's view of the way things *should* be done?
> 
> Paul

Yup, been there in a mid-sized web agency a few years ago, although with
Java/JSP rather than PHP. The sensitive types drew the pretty pictures on their
Macs, passed the design to the HTML hackers who broke the pretty pictures into
sprawling arrays of table cells and image fragments, then passed the HTML to the
Java teams (me and others) who had to slot in the logic without spoiling the
pretty pictures. Then the sensitive types would see a pixel out of place and the
HTML hackers would have to carefully navigate the logic sections and tweak the
tables to make it look right again.
It certainly focuses the mind about separating logic and presentation. In the
end most of the JSP was done with JSP tag libraries, so that the HTML hackers
were not too distracted by scary Java code.
It actually all worked quite well, and produced some really beautiful web sites
AND really elegant code libraries.
But then the dot-com thing all fell over and it was too expensive for most
people to pay for three teams and a couple of managers just to build a web 
shop...


-- 
Peter Ford                              phone: 01580 893333
Developer                               fax:   01580 893399
Justcroft International Ltd., Staplehurst, Kent


--- End Message ---
--- Begin Message ---
Paul M Foster wrote:
But here's a question for those of you who work in a collaborative
environment-- are you really ever in a situation where some HTML weenie
is coding HTML pages and you're somewhere else doing the PHP work? Or is
that some academic's view of the way things *should* be done?

Paul

yep very frequently, infact I'd say I only work in the display layer about 20% of the time now; if that.
--- End Message ---
--- Begin Message ---
Paul M Foster wrote:
But here's a question for those of you who work in a collaborative
environment-- are you really ever in a situation where some HTML weenie
is coding HTML pages and you're somewhere else doing the PHP work? Or is
that some academic's view of the way things *should* be done?

Paul

yep very frequently, infact I'd say I only work in the display layer about 20% of the time now; if that.
--- End Message ---
--- Begin Message ---
Peter Ford wrote:
Paul M Foster wrote:
(snip)
But here's a question for those of you who work in a collaborative
environment-- are you really ever in a situation where some HTML weenie
is coding HTML pages and you're somewhere else doing the PHP work? Or is
that some academic's view of the way things *should* be done?

Paul

Yup, been there in a mid-sized web agency a few years ago, although with
Java/JSP rather than PHP. The sensitive types drew the pretty pictures on their
Macs, passed the design to the HTML hackers who broke the pretty pictures into
sprawling arrays of table cells and image fragments, then passed the HTML to the
Java teams (me and others) who had to slot in the logic without spoiling the
pretty pictures. Then the sensitive types would see a pixel out of place and the
HTML hackers would have to carefully navigate the logic sections and tweak the
tables to make it look right again.
It certainly focuses the mind about separating logic and presentation. In the
end most of the JSP was done with JSP tag libraries, so that the HTML hackers
were not too distracted by scary Java code.
It actually all worked quite well, and produced some really beautiful web sites
AND really elegant code libraries.
But then the dot-com thing all fell over and it was too expensive for most
people to pay for three teams and a couple of managers just to build a web 
shop...



think you've hit on something there; when I'm not coding in php I'm coding in java; which has a very strong focus on code seperation and using certain architectures / design patterns; it's hard not to cary this over to php and other languages once you've started doing it - as you say it leads to "really beautiful web sites AND really elegant code libraries"

at the same time though there's the time/effort/cost factors and often it's not efficient or cost effective in any way to knock up a perfectly coded application for a small-mid sized site. Not that stops me trying / picking & choosing the work which allows me the freedom to code "properly"

ooh, worth noting that using flex as a front end almost by nature forces you to use an mvc/3-tier/n-tier architecture :) makes coding much more enjoyable.
--- End Message ---
--- Begin Message ---
Peter Ford wrote:
Paul M Foster wrote:
(snip)
But here's a question for those of you who work in a collaborative
environment-- are you really ever in a situation where some HTML weenie
is coding HTML pages and you're somewhere else doing the PHP work? Or is
that some academic's view of the way things *should* be done?

Paul

Yup, been there in a mid-sized web agency a few years ago, although with
Java/JSP rather than PHP. The sensitive types drew the pretty pictures on their
Macs, passed the design to the HTML hackers who broke the pretty pictures into
sprawling arrays of table cells and image fragments, then passed the HTML to the
Java teams (me and others) who had to slot in the logic without spoiling the
pretty pictures. Then the sensitive types would see a pixel out of place and the
HTML hackers would have to carefully navigate the logic sections and tweak the
tables to make it look right again.
It certainly focuses the mind about separating logic and presentation. In the
end most of the JSP was done with JSP tag libraries, so that the HTML hackers
were not too distracted by scary Java code.
It actually all worked quite well, and produced some really beautiful web sites
AND really elegant code libraries.
But then the dot-com thing all fell over and it was too expensive for most
people to pay for three teams and a couple of managers just to build a web 
shop...



think you've hit on something there; when I'm not coding in php I'm coding in java; which has a very strong focus on code seperation and using certain architectures / design patterns; it's hard not to cary this over to php and other languages once you've started doing it - as you say it leads to "really beautiful web sites AND really elegant code libraries"

at the same time though there's the time/effort/cost factors and often it's not efficient or cost effective in any way to knock up a perfectly coded application for a small-mid sized site. Not that stops me trying / picking & choosing the work which allows me the freedom to code "properly"

ooh, worth noting that using flex as a front end almost by nature forces you to use an mvc/3-tier/n-tier architecture :) makes coding much more enjoyable.
--- End Message ---
--- Begin Message ---
Hi,

please can someone try to add a logging with .htaccess and use a relative path to logfile? I always get an open_basedir error...

open_basedir and document_root of domain points to: /path/path/
In /path/path/ is located the .htaccess with:
php_flag log_errors on
php_value error_log subpath/logfile.txt
(logfile.txt is writeable)

It just only works if path to logfile.txt is given absolut as /path/path/subpath/logfile.txt
The relative path works reproducable in php 5.2.6
Please can somebody confirm this behavior? May be a kind of bug? This behavior seems to be new to me...


Thanks,
Andre
--- End Message ---
--- Begin Message ---
Andre Hübner wrote:
Hi,

please can someone try to add a logging with .htaccess and use a relative path to logfile? I always get an open_basedir error...

open_basedir and document_root of domain points to: /path/path/
In /path/path/ is located the .htaccess with:
php_flag log_errors on
php_value error_log subpath/logfile.txt
(logfile.txt is writeable)

It just only works if path to logfile.txt is given absolut as /path/path/subpath/logfile.txt
The relative path works reproducable in php 5.2.6
Please can somebody confirm this behavior? May be a kind of bug? This behavior seems to be new to me...


Thanks,
Andre

have you checked that you're php 5.2.8 is definately using the correct php.ini?
--- End Message ---
--- Begin Message ---
Andre Hübner wrote:

----- Original Message ----- From: "Nathan Rixham" <[email protected]>
To: "Andre Hübner" <[email protected]>
Cc: <[email protected]>
Sent: Monday, January 12, 2009 11:19 AM
Subject: Re: php_value error_log realtive path in 5.2.8


Andre Hübner wrote:
Hi,

please can someone try to add a logging with .htaccess and use a relative path to logfile? I always get an open_basedir error...

open_basedir and document_root of domain points to: /path/path/
In /path/path/ is located the .htaccess with:
php_flag log_errors on
php_value error_log subpath/logfile.txt
(logfile.txt is writeable)

It just only works if path to logfile.txt is given absolut as /path/path/subpath/logfile.txt
The relative path works reproducable in php 5.2.6
Please can somebody confirm this behavior? May be a kind of bug? This behavior seems to be new to me...


Thanks,
Andre

have you checked that you're php 5.2.8 is definately using the correct php.ini?

yes, my php.ini should not be the problem
with php 5.2.6 i use the same version cause im my own packager.

Thanks,
Andre


sorry going through the obvious ones -
a: is the log file path ../subpath/logfile.txt
b: what happens if you set it to ./subpath/logfile.txt
c: check the values when you get_cfg_var() / ini_get() the values in question
--- End Message ---
--- Begin Message ---
Andre Hübner wrote:

----- Original Message ----- From: "Nathan Rixham" <[email protected]>
To: "Andre Hübner" <[email protected]>
Sent: Monday, January 12, 2009 12:18 PM
Subject: Re: php_value error_log realtive path in 5.2.8


Andre Hübner wrote:

----- Original Message ----- From: "Nathan Rixham" <[email protected]>
To: "Andre Hübner" <[email protected]>; "PHP-General" <[email protected]>
Sent: Monday, January 12, 2009 11:43 AM
Subject: Re: php_value error_log realtive path in 5.2.8


Andre Hübner wrote:

----- Original Message ----- From: "Nathan Rixham" <[email protected]>
To: "Andre Hübner" <[email protected]>
Cc: <[email protected]>
Sent: Monday, January 12, 2009 11:19 AM
Subject: Re: php_value error_log realtive path in 5.2.8


Andre Hübner wrote:
Hi,

please can someone try to add a logging with .htaccess and use a relative path to logfile? I always get an open_basedir error...

open_basedir and document_root of domain points to: /path/path/
In /path/path/ is located the .htaccess with:
php_flag log_errors on
php_value error_log subpath/logfile.txt
(logfile.txt is writeable)

It just only works if path to logfile.txt is given absolut as /path/path/subpath/logfile.txt
The relative path works reproducable in php 5.2.6
Please can somebody confirm this behavior? May be a kind of bug? This behavior seems to be new to me...


Thanks,
Andre

have you checked that you're php 5.2.8 is definately using the correct php.ini?

yes, my php.ini should not be the problem
with php 5.2.6 i use the same version cause im my own packager.

Thanks,
Andre


sorry going through the obvious ones -
a: is the log file path ../subpath/logfile.txt
b: what happens if you set it to ./subpath/logfile.txt
c: check the values when you get_cfg_var() / ini_get() the values in question


interesting...
a/b. with ../subpath/logfile.txt ./subpath/logfile.txt and subpath/logfile.txt i get open_basedir restriction. c: the interesting part. if i use relative path in .htaccess the ini_get("error_log") is completly empty a value is only shown when used a absolut path, but in error_log i can see the path whcih is used in .htaccess
strange case... what do you think?





what about when you do a phpinfo().. whats the val under error_log local and master?
+upgrading to 5.2.8 locally to see if i can replicate

sorry, forget about CVE-2007-3378, is not changed in current version.
my mistake, im sorry...



you'll be perhaps glad to know that I've replicated it identically over here; PHP 5.2.8 on windows vista with apache 2.2.10

may be worth noting that if you add the lines to your vhosts.conf file instead under each vhost it works fine; however definately only absolute paths allowed in .htaccess when using open_basedir

I'll post on internals for confirmation and get back to you

regards, nath

--- End Message ---
--- Begin Message ---
> Is there something in PHP5 which can generate the RSS feed?

You don't need an extension to help you generate an XML feed. You
dimply output XML data instead of HTML and send an appropriate content
type header, eg:

header('Content-Type: text/xml');

And the actual data:

<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="0.91">
    <channel>
        <title><!-- The title of your feed --></title>
        <link><!-- The URL to your website --></link>
        <description>
            <!-- A summary of your feed -->
        </description>
            <item>
                <title><!-- The title of your feed --></title>
                <link><!-- The link to the article --></link>
                <pubDate><!-- The data of the article --></pubDate>
                <description>
                    <!-- The text of the article or a preview -->
                </description>
            </item>
    </channel>
</rss>

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 4th)

--- End Message ---
--- Begin Message ---
>            <item>
>                <title><!-- The title of your feed --></title>

Oops, that should be the title of the individual article.

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 4th)

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
Is there something in PHP5 which can generate the RSS feed?

You don't need an extension to help you generate an XML feed. You
dimply output XML data instead of HTML and send an appropriate content
type header, eg:

header('Content-Type: text/xml');


I was just about to send something similar :)


--- End Message ---
--- Begin Message ---
On Mon, 2009-01-12 at 11:02 +0000, Richard Heyes wrote:
> > Is there something in PHP5 which can generate the RSS feed?
> 
> You don't need an extension to help you generate an XML feed. You
> dimply output XML data instead of HTML and send an appropriate content
> type header, eg:
> 
> header('Content-Type: text/xml');
> 
 You actually mean application/xml not text/xml

And its alot better to use DOMDocument in PHP5 for XML Creation rather
than hardcode everything.





Thanks




> And the actual data:
> 
> <?xml version="1.0" encoding="iso-8859-1"?>
> <rss version="0.91">
>     <channel>



--- End Message ---
--- Begin Message ---
Craig Whitmore wrote:
On Mon, 2009-01-12 at 11:02 +0000, Richard Heyes wrote:
Is there something in PHP5 which can generate the RSS feed?
You don't need an extension to help you generate an XML feed. You
dimply output XML data instead of HTML and send an appropriate content
type header, eg:

header('Content-Type: text/xml');

 You actually mean application/xml not text/xml


actually..
header("Content-type: application/rss+xml; charset=iso-8859-1")
or
header("Content-type: application/rss+xml; charset=utf-8")

And its alot better to use DOMDocument in PHP5 for XML Creation rather
than hardcode everything.


agreed in principle; and I can't belive i'm saying this.. but with the case of a single rss feed in a single format then a tiny inline script which echo's out is far far lighter on the server and will do the trick; it's one of those set-up and leave scripts so DOMDocument may be overkill in this situation.

here's an example / test code:

<?php
$rss_item_template = '  <item>
                <title>RSS_TITLE</title>
                <link>RSS_LINK</link>
                <pubDate>RSS_DATE</pubDate>
                <dc:creator>mediatakeout</dc:creator>
                <category><![CDATA[news]]></category>
                <guid isPermaLink="false">RSS_LINK</guid>
                <description><![CDATA[RSS_DESCRIPTION]]></description>
                <content:encoded><![CDATA[RSS_DESCRIPTION]]></content:encoded>
        </item>
';
$rss_items = '';
$align = 'right';
if( $raw_items = $db->select("SELECT * FROM `news` LIMIT 0,20") ) {
  foreach($raw_items as $index => $item ) {
   $title = stripJunkSimple(stripslashes(htmlentities($item['title'])));
   $link = "http://domain.com/";. $item['id']; //edit
   $date = date( 'r', $item['posting_date'] );  //edit
   $plain = str_replace("\n",'<br />',stripslashes($item['body']));
   $in = array('RSS_TITLE','RSS_LINK','RSS_DATE','RSS_DESCRIPTION');
   $out = array( $title, $link, $date, $plain );
   $rss_simple_item = str_replace( $in , $out , $rss_item_template );
   $rss_items .= $rss_simple_item;
  }
}
$rss_template = '<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0"
        xmlns:content="http://purl.org/rss/1.0/modules/content/";
        xmlns:wfw="http://wellformedweb.org/CommentAPI/";
        xmlns:dc="http://purl.org/dc/elements/1.1/";
        xmlns:atom="http://www.w3.org/2005/Atom";
        >
        <channel>
                <title>Domain.com RSS Feed</title>
<atom:link href="http://' .'domain.com'. '/rss/" rel="self" type="application/rss+xml" />
                <link>http://' .'domain.com'. '/</link>
                <description>Top Stories on Domain.com</description>
                <pubDate>' . date('r') . '</pubDate>
                <generator>http://' . 'domain.com' . '/</generator>
                <language>en</language>
' . $rss_items . '
        </channel>
</rss>';
header("Content-type: application/rss+xml; charset=iso-8859-1");
echo $rss_template;
?>



--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
here's an example / test code:

   $title = stripJunkSimple(stripslashes(htmlentities($item['title'])));

there are a couple of custom functions in this script i forgot to pull out so stripJunkSimple can be removed and the db lookup replaced with you're own - just sample code but you should be aware incase of copy and pasting
--- End Message ---
--- Begin Message ---
Nathan Rixham wrote:
here's an example / test code:

   $title = stripJunkSimple(stripslashes(htmlentities($item['title'])));

there are a couple of custom functions in this script i forgot to pull out so stripJunkSimple can be removed and the db lookup replaced with you're own - just sample code but you should be aware incase of copy and pasting
--- End Message ---
--- Begin Message ---
>>> header('Content-Type: text/xml');
>>>
>>  You actually mean application/xml not text/xml

Well, no. I use text/xml and have done for nearly 5 years, and it works fine.

>> And its alot better to use DOMDocument in PHP5 for XML Creation rather
>> than hardcode everything.

DOMDocument would be overkill.

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 4th)

--- End Message ---
--- Begin Message ---
Richard Heyes wrote:
header('Content-Type: text/xml');

 You actually mean application/xml not text/xml

Well, no. I use text/xml and have done for nearly 5 years, and it works fine.
it does, but in 2006 it was upgraded to application/rss+xml for all rss versions; all the major readers and browsers recognise this and it's the first choice for rss autodiscovery; second up is application/xml, and finally for backwards compatibility text/xml. the new type was introduced as application/xml had some nuances with charector encoding definition and this is an integral part of an rss feed for it to be valid it's charset must match the content.
http://www.rssboard.org/rss-mime-type-application.txt
http://www.ietf.org/rfc/rfc3023.txt

it's the same for xhtml pages:
"This document summarizes the best current practice for using various Internet media types for serving various XHTML Family documents. In summary <http://www.w3.org/TR/xhtml-media-types/#summary>, 'application/xhtml+xml' *SHOULD* be used for XHTML Family documents, and the use of 'text/html' *SHOULD* be limited to HTML-compatible XHTML 1.0 documents. 'application/xml' and 'text/xml' *MAY* also be used, but whenever appropriate, 'application/xhtml+xml' *SHOULD* be used rather than those generic XML media types."
http://www.w3.org/TR/xhtml-media-types/
And its alot better to use DOMDocument in PHP5 for XML Creation rather
than hardcode everything.

DOMDocument would be overkill.

yup

--- End Message ---
--- Begin Message ---
> ...

Suppose I should change my feed then. At some point... :-)

-- 
Richard Heyes

HTML5 Graphing for Firefox, Chrome, Opera and Safari:
http://www.rgraph.org (Updated January 4th)

--- End Message ---
--- Begin Message ---
Hello Richard,

Am 2009-01-12 11:02:39, schrieb Richard Heyes:
> > Is there something in PHP5 which can generate the RSS feed?
> 
> You don't need an extension to help you generate an XML feed. You
> dimply output XML data instead of HTML and send an appropriate content
> type header, eg:
<snip>

Thanks for the tip...  If it is easy like this, I will go with it..

Thanks, Greetings and nice Day/Evening
    Michelle Konzack
    Systemadministrator
    24V Electronic Engineer
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
<http://www.tamay-dogan.net/>               <http://www.can4linux.org/>
Michelle Konzack   Apt. 917                  ICQ #328449886
+49/177/9351947    50, rue de Soultz         MSN LinuxMichi
+33/6/61925193     67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---

Reply via email to