Home > php教程 > PHP源码 > 一段简单又实用的PHP获取RSS订阅代码

一段简单又实用的PHP获取RSS订阅代码

PHP中文网
Release: 2016-05-25 17:13:24
Original
1390 people have browsed it

一段简单又实用的PHP获取RSS订阅代码,比较基础,在代码基础上自行编写样式,即可!  

<?php
$rss=simplexml_load_file(&#39;http://meego123.net/rss.php&#39;);?>
<?php foreach($rss->channel->item as $item){?>
<h1><a href="<?php echo $item->link ?>"><?php echo $item->title; ?></a></h1>
<?php echo"<p>". $item->description ."</p>";}
?>
Copy after login


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template