Hi guys, i’m trying to pull the first description out of an rss feed and it seems to be pulling out more than I need. Can anyone spot where i’m going wrong?
<?php
$url = 'http://www.washingmachinesale.org/feed.xml';
$str = file_get_contents($url);
$pos1 = strpos($str , '<description>', 0);
$pos2 = strpos($str, '</description>', 0);
$rest = substr($str, $pos1, $pos2);
echo $rest;
?>