PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
SteveCrooks
New Member
New Member


Joined: Sep 30, 2003
Posts: 4

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

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: 16987
Location: Kansas

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

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 Visit poster's website AIM Address Yahoo Messenger
SteveCrooks
New Member
New Member


Joined: Sep 30, 2003
Posts: 4

PostPosted: Tue Sep 30, 2003 11:52 am Reply with quote Back to top

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
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Sep 30, 2003 12:01 pm Reply with quote Back to top

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....
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
SteveCrooks
New Member
New Member


Joined: Sep 30, 2003
Posts: 4

PostPosted: Tue Sep 30, 2003 12:06 pm Reply with quote Back to top

Typical lazy hosting co huh? Rolling Eyes
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Sep 30, 2003 12:13 pm Reply with quote Back to top

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>";
?>
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Sep 30, 2003 12:14 pm Reply with quote Back to top

SteveCrooks wrote:
Typical lazy hosting co huh? Rolling Eyes
Laughing Yeh, better stay away from here Laughing
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
SteveCrooks
New Member
New Member


Joined: Sep 30, 2003
Posts: 4

PostPosted: Tue Sep 30, 2003 1:35 pm Reply with quote Back to top

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
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Tue Sep 30, 2003 6:13 pm Reply with quote Back to top

Thank you so much for the very kind words and for the donation! Glad I could help!
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum