Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
SteveCrooks
New Member
New Member


Joined: Sep 30, 2003
Posts: 4

PostPosted: Tue Sep 30, 2003 11:04 am Reply with quote

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>&nbsp; </p>
_FORUMNEWS_;
?>


Any ideas??

Thanks

Steve
 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17077

PostPosted: Tue Sep 30, 2003 11:41 am Reply with quote

Try this
Code:
<?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>&nbsp; </p>";
?>

Works perfectly on my iste Wink
 
View user's profile Send private message
SteveCrooks
PostPosted: Tue Sep 30, 2003 11:52 am Reply with quote

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
 
Raven
PostPosted: Tue Sep 30, 2003 12:01 pm Reply with quote

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....
 
SteveCrooks
PostPosted: Tue Sep 30, 2003 12:06 pm Reply with quote

Typical lazy hosting co huh? Rolling Eyes
 
Raven
PostPosted: Tue Sep 30, 2003 12:13 pm Reply with quote

Try this
Code:
<?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>&nbsp; </p>";
?>
 
Raven
PostPosted: Tue Sep 30, 2003 12:14 pm Reply with quote

SteveCrooks wrote:
Typical lazy hosting co huh? Rolling Eyes
Laughing Yeh, better stay away from here Laughing
 
SteveCrooks
PostPosted: Tue Sep 30, 2003 1:35 pm Reply with quote

You are, of course, the ultimate oracle in all things code!! Very Happy

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
 
Raven
PostPosted: Tue Sep 30, 2003 6:13 pm Reply with quote

Thank you so much for the very kind words and for the donation! Glad I could help!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©