So i am having a killer issue. I can't get this xml data to show. It was working 3 months ago and now it's not. Any suggestions to fix this bugger would help me out a ton!
Yes - I have checked to see if the link is working, and live and it is.
<?php
if(file_exists('http://blog.millcitychurch.org/blog/rss.xml')){ ?>
<h1>// THE LATEST FROM MILL city</h1>
<div class="feed">
<?php
$xml = file_get_contents('http://blog.millcitychurch.org/blog/rss.xml');
$url = 'http://blog.millcitychurch.org/blog/rss.xml';
$rss = simplexml_load_file($xml);
if($rss) {
$items = $rss->channel->item;
$i = 0;
foreach($items as $item) {
if (++$i > 4) {
// stop after 5 loops
break;
}
$title = $item->title;
$link = $item->link;
$published_on = $item->pubDate;
$description = strip_tags($item->description);
$position=215; // Define how many character you want to display.
$message = $description;
$post_content = substr($message, $position, 1);
$post_content = substr($message,0,$position); // Display your message
echo '<div class="feed-desc">' ;
echo '<h2>'.$title.'</h2><p>';
echo $post_content;
echo '</p><div class="readmore"><a href="'.$link.'">... read more</a></div>';
echo '<div class="date">'.$published_on.'</div>';
echo '</div>';
}
} ?>
</div><! -- end .feed -->
<?php } ?>