Jump to content

anthonyp01

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

anthonyp01's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. So basically this is my problem on the other server: <?php require("_includes/rss.php"); ?> <?php $rss = new lastRSS; $rss->cache_dir = "_includes/rsscache/"; $rss->cache_time = 7200; $rssout = $rss->get("http://door15design.blogspot.com/feeds/posts/default?alt=rss"); print_r($rssout); foreach($rssout['items'] as $item){ $time = strtotime($item['pubDate']); ?> <h3><?php echo $item['title'];?></h3> <div> <?php echo html_entity_decode($item['description']);?></div> <h6><?php echo date("jS F Y",$time);?></h6> <?php } ?> This code works fine on the test server but not on my live server i get this error: Warning: Invalid argument supplied for foreach() in /usr/local/home/httpd/vhtdocs/door15.co.uk/HTML/index.php on line 482
  2. Yes ofc. This is the code for the blog: <?php include("_includes/lastRSS.php"); $rss = new lastRSS; $rss->cache_dir = "_includes/rsscache/"; $rss->cache_time = 7200; $rssout = $rss->get("http://door15design.blogspot.com/feeds/posts/default?alt=rss"); print_r($rssout); foreach($rssout['items'] as $item){ $time = strtotime($item['pubDate']); ?> <h3><?php echo $item['title'];?></h3> <div> <?php echo html_entity_decode($item['description']);?></div> <h6><?php echo date("jS F Y",$time);?></h6> <?php } ?> The include line is at the top. But i have added rss.php at the top of the site: <?php require("_includes/rss.php"); ?> do rss.php and lastRSS.php do similar things? lastRSS.php is not installed on the other server yet the blog runs fine. See here: http://www.clients.interdesigns.co.uk/Door15/
  3. Bah! It gets worse! check this out: http://door15.co.uk/HTML/ Why is doing that? I added your line like this: <?php include("_includes/lastRSS.php"); $rss = new lastRSS; $rss->cache_dir = "_includes/rsscache/"; $rss->cache_time = 7200; $rssout = $rss->get("http://door15design.blogspot.com/feeds/posts/default?alt=rss"); print_r($rssout); foreach($rssout['items'] as $item){ $time = strtotime($item['pubDate']); ?> <h3><?php echo $item['title'];?></h3> <div> <?php echo html_entity_decode($item['description']);?></div> <h6><?php echo date("jS F Y",$time);?></h6> <?php } ?> Are you sure i need lastRSS.php? I have already added this to my file <?php require("_includes/rss.php"); ?> Does that not do the same thing?
  4. Nope, Sorry but i'm not that great at php Im a graphic designer and flash programmer mainly. This code worked on another server with no problems, just not on mine. here is my test site im running it on blog is at the bottom http://www.door15.co.uk/HTML/
  5. Hi Darkwarter, I added that line as you requested but when running the page i get nothing, Just the same error. I added the line here: <?php $rss = new lastRSS; $rss->cache_dir = "_includes/rsscache/"; $rss->cache_time = 7200; $rssout = $rss->get("http://myaccount.blogspot.com/feeds/posts/default?alt=rss"); print_r($rssout); foreach($rssout['items'] as $item){ $time = strtotime($item['pubDate']); ?> <h3><?php echo $item['title'];?></h3> <div> <?php echo html_entity_decode($item['description']);?></div> <h6><?php echo date("jS F Y",$time);?></h6> <?php } ?>
  6. No that doesn't work, thanks for your input though! Anybody else got any clues? :'(
  7. Hello guys! This is my first post and hopefully you can help me! I am trying to embed my blog into my website and the following code works below on a tempory server but when i run it on my paid server is get this error Warning: Invalid argument supplied for foreach() in Can anybody please help me. <?php $rss = new lastRSS; $rss->cache_dir = "_includes/rsscache/"; $rss->cache_time = 7200; $rssout = $rss->get("http://myaccount.blogspot.com/feeds/posts/default?alt=rss"); foreach($rssout['items'] as $item){ $time = strtotime($item['pubDate']); ?> <h3><?php echo $item['title'];?></h3> <div> <?php echo html_entity_decode($item['description']);?></div> <h6><?php echo date("jS F Y",$time);?></h6> <?php } ?> <?php Many thanks for your help in advance. Anthony
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.