Posted on: 04/07/04 09:07pm
By: my3shadows
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
Error message on php include on static page
Posted on: 04/08/04 03:33am
By: Dirk
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
Error message on php include on static page
Posted on: 04/08/04 10:06am
By: my3shadows
file did not work, but readfile did!
Thanks! You just made my life a little easier...
I'll look into the external pages plugin though, that might be the better way to do it.
Rachael
Error message on php include on static page
Posted on: 06/03/04 09:03am
By: Uffe
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"
; ?>
Can you show me your codes ! it will made my life a little easier to
/Uffe
Error message on php include on static page
Posted on: 06/03/04 11:24am
By: mthomas
<?
$externalfile = readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include"
;
echo $externalfile
?>
Or to wrap it in Geeklog use
?>
//adjust the ../ based on where you page is located
require_once('../lib-common.php'
;
$display = COM_siteHeader();
$display .= COM_startBlock("An External File"
$display .= readfile("http://www.geeklog.net/forum/viewtopic.php?forum=2&showtopic=33161&highlight=include"
;
$display .= COM_endBlock();
$display .= COM_siteFooter(false);
echo $display;
?>
Error message on php include on static page
Posted on: 06/03/04 02:50pm
By: Uffe
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
Error message on php include on static page
Posted on: 06/03/04 08:22pm
By: mthomas
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.
Error message on php include on static page
Posted on: 06/04/04 02:03am
By: Uffe
Is this correct setup:
click here[*1]
becaurse it is not working.
/Uffe
Error message on php include on static page
Posted on: 06/04/04 10:10am
By: mthomas
Its correct and working for me...
I'm using GeekLog 1.3.9 perhaps thas where the differnce is.
Error message on php include on static page
Posted on: 06/04/04 05:43pm
By: Uffe
OK, thanks anyway for your help...
Maybe it´s time to upgrade to GeekLog 1.3.9.
/Uffe