我的提要是用PHP和MYSQL製作成XML然後feedburner。PHP和XML:Dlvr.it不起作用
我的問題是,dlvr.it無法在每次發佈時都讀取新條目。
這裏是我的PHP代碼:
<?php
include('db.php');
header('Content-Type: text/xml');
echo '<?xml version="1.0" encoding="ISO-8859-1"?>
<rss version="2.0">
<channel>
<title>MindWeather Thesis</title>
<description>Latest News from my website</description>
<link>http://www.mindweather.info</link>';
$get_articles = "SELECT Fore_ID, Valid, Synopsis,
DATE_FORMAT(Issued,'%a, %e %b %Y %T') as formatted_date
FROM tblforecast ORDER BY Issued DESC LIMIT 15";
$articles = mysql_query($get_articles) or die(mysql_error());
while ($article = mysql_fetch_array($articles)){
echo '
<item>
<title>'.$article['Valid'].'-hour Forecast</title>
<description><![CDATA['.$article['Synopsis'].']]> </description>
<link>http://mindweather.info/fforecast.php?fore='.$article['Fore_ID'].'</link>
<pubDate>'.$article['formatted_date'].' GMT</pubDate>
</item>';
}
echo '</channel>
</rss>';
?>
的FeedBurner資訊位於:http://www.mindweather.info/feedz2.php
你的回答會是有很大幫助。謝謝!
「不起作用」是我們理解問題的不充分說明。當你嘗試時發生了什麼?你收到錯誤信息了嗎?你得到不正確的結果了嗎? –
它顯示結果並沒有錯誤信息。 – Clary