Display threads using RSS

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
Before I start just want to check if I am on the right path.

If I want to create a site called for example:

LatestMybbthreads.co.za

What would be the way to import and display the threads?

I want to do this for a site of mine, I was thinking of writing something that will use the RSS feed and then just format the output to my liking, is that a good way of going about it or is there another better, preferred way that I am overlooking?
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
Question.

My XML feed has </br> tags in the description which I want php to ignore.
Can someone suggest a ways I can do this?

I do a simply
PHP:
getElementsByTagName('description')
in order to get the content from the XML feed and then I echo that in the HTML

Problem is, I now get something like this:

Some heading

Lorem Ipsum is simply dummy text of the printing and typesetting industry.


Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.


It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.

where instead I would just like it to be:

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
strip_tags($description); seemed to do it
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
I went with this:

PHP:
$description = preg_replace('/<br \/>/iU', '', $description);
 

Thor

Honorary Master
Joined
Jun 5, 2014
Messages
44,236
I am now busy with unlearning everything I know and adopting PDO. Incredible the amount of security PDO takes care of out of the box!!

I love life.
 
Top