我用以下php下载http://www.6rooms.com/rss.php是出以下错
(XML 文档只能有一个顶层元素。处理资源 'http://mp3.zhongsou.com/test/thx.php?url=http://www.6rooms.com/rss.php' 时出错。第 2 行,位置: 2
<b>Warning</b>: file_get_contents(http://www.6rooms.com/rss.php): failed to open stream: HTTP request failed! H...)
但是下载其他页面没有问题
<?
header("Content-Type: application/xml");
$strurl = $_GET["url"];
$str = file_get_contents($strurl);
echo $str;
?>
(XML 文档只能有一个顶层元素。处理资源 'http://mp3.zhongsou.com/test/thx.php?url=http://www.6rooms.com/rss.php' 时出错。第 2 行,位置: 2
<b>Warning</b>: file_get_contents(http://www.6rooms.com/rss.php): failed to open stream: HTTP request failed! H...)
但是下载其他页面没有问题
<?
header("Content-Type: application/xml");
$strurl = $_GET["url"];
$str = file_get_contents($strurl);
echo $str;
?>
'http://mp3.zhongsou.com/test/thx.php?url=http://www.6rooms.com/rss.php'
解析人家的xml??????????
header("Content-Type: text/xml");