0
我想添加RSS訂閱到我的網站。對於不同的主題有不同的RSS源。我不知道該怎麼做是允許用戶訂閱RSS源?我想提出一個鏈接,說'訂閱RSS種子或只是RSS圖標。 Feed.php
具有RSS饋送,所以取決於$id
不同RSS頻道將被顯示。PHP訂閱RSS提要
Feed.php
<?php
header("Content-Type: application/xml; charset=ISO-8859-1");
include "database.php";
$id = $_GET['id'];
$type = $_GET['type'];
$position = $_GET['position'];
$database = new Database();
$database->opendb();
$items = $database->rssfeed($id,$position,$type);
$database->closedb();
?>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<?php
echo $items;
?>
</channel>
</rss>
我該讓什麼方式向用戶訂閱的RSS源?例如在我的網站上,有話題資訊提供的網址可能是www.example.com/feed/12