0
我想將一個下拉列表添加到RSS供稿解析器。如何將表單選擇選項添加到php rss供稿腳本
我有這樣的:
<fieldset class="rsslib">
<?php
$cachename = "rss-cache-tmp.php";
$url = "http://www.theweekinchess.com/twic-rss-feed";
if(file_exists($cachename))
{
$now = date("G");
$time = date("G", filemtime($cachename));
if($time == $now)
{
include($cachename);
exit();
}
}
require_once("rsslib.php");
$cache = RSS_Display($url, 15, false, true);
file_put_contents($cachename, $cache);
echo $cache;
?>
</fieldset>
但我想設置PHP中的$網址與選擇的選項,如下所示:
<?php
$temp = $_POST["url"];
?>
<form method = "post">
<select name="url" id="url">
<option value="http://www.theweekinchess.com/twic-rss-feed">TWIC</option>
<option value="http://chesscafe.com/feed/">Chess Cafe</option>
<option value="http://www.chessdom.com/rss">Chessdom</option>
<option value="http://chess-news.ru/rss-eng">Chess-news</option>
<option value="http://www.chess.com/rss/articles">chess.com</option>
</select>
</form>
但我無法通過表單變量PHP腳本。我試過但我的結果很可悲,我想離開原來的代碼來簡化事情。
任何想法?
只是使用'$ temp'爲您的網址裏面'RSS_Display' – Ghost