Author |
Message |
SteveCrooks
New Member
![New Member New Member](modules/Forums/images/ranks/1star.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Sep 30, 2003
Posts: 4
|
Posted:
Tue Sep 30, 2003 11:04 am |
|
Hi,
I have searched NukeCops and this site for anything that may answer this query. Sorry if I have missed the answer and if this is in the wrong place.
I use Ikonboard as my preferred forum software. It produces a few text files which are updated dynamically by the software.
The one I am trying to use in phpNuke is the latest forum headlines file called tiker.txt. I have tried using 'include' which certainly calls the file contents but does not place it inside the block. How can I get the contents of tiker.txt into the $content variable of the block.
I have tried so many different ways that my brain is fudge. I'll post the code that calls the file but does not place it in the box. I have not entered the $content variable because I do not know where or how to place it correctly.
Code:<?
if (eregi("block-tiker.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
include("http://www.oceanyachtclub.co.uk/iB_html/non-cgi/ssi/Tiker.txt");
?>
|
I've even tried using Ravens javascript code block but that doesn't work either.
Code:
<?php
if (eregi("block-Tiker.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content .= <<<_FORUMNEWS_
<p><b>Latest Headlines:</b><p>
include("http://www.oceanyachtclub.co.uk/iB_html/non-cgi/ssi/Tiker.txt");
<p>End...</p>
<p> </p>
_FORUMNEWS_;
?>
|
Any ideas??
Thanks
Steve |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Tue Sep 30, 2003 11:41 am |
|
Try thisCode:<?php
if (eregi("block-Tiker.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "<p><b>Latest Headlines:</b><p>";
$content .= file_get_contents("http://www.oceanyachtclub.co.uk/iB_html/non-cgi/ssi/Tiker.txt");
$content .= "<p>End...</p><p> </p>";
?>
|
Works perfectly on my iste ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
SteveCrooks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 30, 2003 11:52 am |
|
Hi Raven thanks. Unfortunately I am getting a new error:
Quote: | Fatal error: Call to undefined function: file_get_contents() in /homepages/39/d50809248/htdocs/blocks/block-Tiker.php on line 20 |
I am using 6.9 if that helps at all.
Sorry mate, I know these newbie questions must do your head in at times.
Regards
Steve |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 30, 2003 12:01 pm |
|
You have to be using php 4.3.x or newer to use that function. Just a second and I will provide you an alternative.... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
SteveCrooks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 30, 2003 12:06 pm |
|
Typical lazy hosting co huh? ![Rolling Eyes](modules/Forums/images/smiles/icon_rolleyes.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 30, 2003 12:13 pm |
|
Try thisCode:<?php
if (eregi("block-Tiker.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$content = "<p><b>Latest Headlines:</b><p>";
$content .= implode('',file("http://www.oceanyachtclub.co.uk/iB_html/non-cgi/ssi/Tiker.txt"));
$content .= "<p>End...</p><p> </p>";
?>
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 30, 2003 12:14 pm |
|
SteveCrooks wrote: | Typical lazy hosting co huh? |
Yeh, better stay away from here ![Laughing](modules/Forums/images/smiles/icon_lol.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
SteveCrooks
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 30, 2003 1:35 pm |
|
You are, of course, the ultimate oracle in all things code!!
Thanks Raven, I'm heading for a Donate button:)
This opens up so many avenues for me regarding the look and feel of my humble site and its link with my Ikonboard forums. Thanks again sir.
All the best
Steve |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 30, 2003 6:13 pm |
|
Thank you so much for the very kind words and for the donation! Glad I could help! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|