|
I'm a bit depressed by the article. It's too weak.
First of all, I'm not sure that phpinfo() qualifies for a section to discuss. A pair of phrases is enough.
<quote>We should replace any spaces in the filenames with the encoded value of "%20" to ensure the URI is well-formed.</quote>
That's not enough. File names in UNIX can contain eany symbols except '\0', including <, & and >. More, non-ASCII letters do also exist. They should be %-escaped in UTF8 encoding.
And small recommendation about code typing. The following:
$rss = '<rss version="2.0">'
. '<channel>'
. '<title>FTP Monitor: ' . $host . '</title>'
. '<link>' . $linkPrefix . '</link>'
...
has a more convinient alternative:
$rss = <<<EOT
<rss version="2.0">
<channel>'
<title>FTP Monitor: $host</title>
<link>$linkPrefix</link>
...
EOT;
--
olpa @ http://xmlhack.ru/
|