Jump to content
  • 0

Thor Patcher MyBB RSS


xeNium

Question


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  94
  • Reputation:   0
  • Joined:  04/01/12
  • Last Seen:  

<?php

$content = file_get_contents('http://forum.rajagame.com/syndication.php?fid=12&limit=1');

if($content) {

    $i = 0;

    $xml = new SimpleXmlElement($content);

    $newsAmount = (int)5;

}

?>

<?php if(isset($xml) && isset($xml->channel)): ?>

    <?php foreach($xml->channel->item as $rssItem): ?>

        <?php $i++; if($i <= $newsAmount): ?>

        <div style="padding-left: 20px;">

            <span><a href="<?php echo $rssItem->link ?>"><?php echo $rssItem->title ?></a></span>

            <p>

                <?php echo $rssItem->description ?>

                <?php echo date('M j, Y', strtotime($rssItem->pubDate)) ?>

            </p>

            <br />

        </div>

        <?php endif ?>

    <?php endforeach ?>

<?php endif ?>

 

I don't know why but it seems MyBB RSS Syndication is a bit different than general rss because if I am using http://www.gmanetwork.com/news/rss/news it does work, do I must change script or what?

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...