|
Posted by Vince Morgan on 04/26/07 09:29
"zach" <wackzingo@gmail.com> wrote in message
news:F7SdnewfZeP1na3bnZ2dnUVZ_gCdnZ2d@wavecable.com...
> Hello everyone,
>
> I was looking for short simple script to show rss feeds on my website
> and I found this one and it works awesome except I don't know what to
> add or modify to limit the number of entries it shows. The entire script
> is posted below. Thanks in advance for the help.
>
funcion chopRss($fileIn, $fileOut, $noItems)
{
$reRss=file_get_contents($fileIn);
$ary=spliti('<item>', $reRss);
$reRss='';
$i=0;
while($i < $noItems)
{
$reRss.=$ary[$i];
++$i;
}
$reRss.='</channel></rss>';
file_put_contents($fileOut, $reRss);
)
Perhaps there is a better solution, not tested but I don't think it has any
errors.
HTH
Vince
Navigation:
[Reply to this message]
|