Y
yawnmoth
I have the following PHP script to generate an RSS feed:
<?php
if (isset($_GET['value']))
{
exit(htmlspecialchars($_GET['value']));
}
$num = file_get_contents('counter.txt');
$num++;
$fp = fopen('counter.txt','w');
fputs($fp,$num);
fclose($fp);
echo '<?xml version="1.0"?>';
?>
<rss version="2.0">
<channel>
<title>RSS Test</title>
<link>http://127.0.0.1/rss.php</link>
<description>RSS Test/description>
<item>
<title>test</title>
<description><?php echo $num; ?></description>
<link>http://127.0.0.1/rss.php?value=<?php echo $num; ?></link>
<pubDate><?php echo date('r'); ?></pubDate>
</item>
</channel>
</rss>
It should, every time it is loaded, output a new (larger) number. And
it does when I view it successive times in FireFox. Thunderbird,
however, does nothing. I add 127.0.0.1/rss.php to the "News & Blogs"
section, go to Tools->Account Settings, to News & Blogs, within that,
and set "Check for new articles every ___ minutes" to 1. Twenty
minutes later, I should have twenty new items for that RSS feed,
shouldn't I? The counter, when I view it in FireFox, should have
incremented by 20, shouldn't it have? Because none of that's
happening. In fact, nothing is happening. No updates are being
checked for, what-so-ever, and I don't know why.
Any ideas as to what I'm doing wrong? Is this a problem with
Thunderbird or my PHP script? I'm going to assume the latter because
other RSS feeds do, in fact, work.
<?php
if (isset($_GET['value']))
{
exit(htmlspecialchars($_GET['value']));
}
$num = file_get_contents('counter.txt');
$num++;
$fp = fopen('counter.txt','w');
fputs($fp,$num);
fclose($fp);
echo '<?xml version="1.0"?>';
?>
<rss version="2.0">
<channel>
<title>RSS Test</title>
<link>http://127.0.0.1/rss.php</link>
<description>RSS Test/description>
<item>
<title>test</title>
<description><?php echo $num; ?></description>
<link>http://127.0.0.1/rss.php?value=<?php echo $num; ?></link>
<pubDate><?php echo date('r'); ?></pubDate>
</item>
</channel>
</rss>
It should, every time it is loaded, output a new (larger) number. And
it does when I view it successive times in FireFox. Thunderbird,
however, does nothing. I add 127.0.0.1/rss.php to the "News & Blogs"
section, go to Tools->Account Settings, to News & Blogs, within that,
and set "Check for new articles every ___ minutes" to 1. Twenty
minutes later, I should have twenty new items for that RSS feed,
shouldn't I? The counter, when I view it in FireFox, should have
incremented by 20, shouldn't it have? Because none of that's
happening. In fact, nothing is happening. No updates are being
checked for, what-so-ever, and I don't know why.
Any ideas as to what I'm doing wrong? Is this a problem with
Thunderbird or my PHP script? I'm going to assume the latter because
other RSS feeds do, in fact, work.