Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 01:55 pm EDT

Geeklog Forums

Error message on php include on static page


Status: offline

my3shadows

Forum User
Newbie
Registered: 02/29/04
Posts: 13
I'm trying to pull in an external web page as a php include on a static page and am getting the following error:

Warning: Unknown(): stream does not support seeking in /home/themommy/public_html/staticpages/index.php(78) : eval()'d code on line 3


Line 3 is where my include statement is which is...

include_once("http://thewebpageI'mtryingtopointo,whichisminebtw");


Any idea what this error means and what I might be able to do to fix it? I looked on the php site and it mentions fseek, but I'm not php saavy enough to understand exactly what it was talking about.

BTW, I'm using 1.3.8 w/ static pages 1.3...

Thanks,

Rachael
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
You can't use include for this. Try using readfile or file instead.

Or maybe the external pages plugin would also do the job (not sure, though, since I've never used it myself).

bye, Dirk
 Quote

Status: offline

my3shadows

Forum User
Newbie
Registered: 02/29/04
Posts: 13
file did not work, but readfile did!

Thanks! You just made my life a little easier... Laughing Out Loud

I'll look into the external pages plugin though, that might be the better way to do it.

Rachael
 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
I tried to put this code into my static pages but it did not come out with anything:

<? readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include&quotWink; ?>

Can you show me your codes ! it will made my life a little easier to Smile

/Uffe
 Quote

Status: offline

mthomas

Forum User
Full Member
Registered: 04/18/04
Posts: 148
<?
$externalfile = readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include&quotWink;
echo $externalfile
?>

Or to wrap it in Geeklog use
?>

//adjust the ../ based on where you page is located
require_once('../lib-common.php'Wink;
$display = COM_siteHeader();
$display .= COM_startBlock("An External File&quotWink

$display .= readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include&quotWink;

$display .= COM_endBlock();
$display .= COM_siteFooter(false);
echo $display;
?>
 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
Thank you for your ansver.

It works in a normal file, but i can not make it working in my staticpages.
Have you tested it in your staticpages, if so can you show me all the code to put in the pages !

/Uffe
 Quote

Status: offline

mthomas

Forum User
Full Member
Registered: 04/18/04
Posts: 148
It works if you enable php for static pages.

That said someparts will not work.
It will break links. Specfically links that do not supply a full href URL.
A full href URL would be http://somewhere.com/index.php
this script will break links that only list as href=filename. When the browser sees the link it would link as http://yoursite.com/filename.

Try iframe if you find that links are breaking. Only probably is iframe can be hard to setup to display the whole page without placing a scrolbar in the center of you page.
 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30
Is this correct setup:
click here
becaurse it is not working.

/Uffe
 Quote

Status: offline

mthomas

Forum User
Full Member
Registered: 04/18/04
Posts: 148
Its correct and working for me...
I'm using GeekLog 1.3.9 perhaps thas where the differnce is.
 Quote

Status: offline

Uffe

Forum User
Junior
Registered: 02/01/04
Posts: 30

OK, thanks anyway for your help...
Maybe it´s time to upgrade to GeekLog 1.3.9.

/Uffe
 Quote

All times are EDT. The time is now 01:55 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content