php获取rss

赵宏达
2023-12-01

 

  • <?php
  • $rss=simplexml_load_file('http://meego123.net/rss.php');?>
  • <?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>";}
  • ?>
 类似资料: