Re: Include from another URL?
| From: | Kim Steinhaug | Date: | Thu, 06 May 2004 20:42:40 +0000 |
| Subject: | Re: Include from another URL? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185559@lists.php.net to get a copy of this message | ||
You could always use this :
$text = "";
$fd=fopen($url,"r");
while ($line=fgets($fd,1000)) { $text.=$line; } fclose ($fd);
echo $text;
--
--
Kim Steinhaug
----------------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
----------------------------------------------------------------------
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
----------------------------------------------------------------------
"Nik" <nkarasev@usa.com> wrote in message
news:20040506195845.90889.qmail@pb1.pair.com...
> Hi there,
> I'm new to these groups so forgive me if I'm asking at the wrong place
(tell
> me where then :)
>
> Ok,
> I'm not PHP guru but I need to create a simple script that would do this:
>
> Include a content from another URL into the current output. I have done
> something like
> this:
>
> ------ code start
> <?php
> include 'http://myotherurl.com:8080';
> ?>
> ------ code end
>
> and it seems to work with one exception: it produces a warning message
> saying something like
> "Warning: main(): stream does not support seeking in
.../web-root/index.php
> on line 9"
> where line #9 is: include 'http://myotherurl.com:8080'; from above code.
> It then shows a message from 'http://myotherurl.com:8080'
>
> Thanks!!!
> Nik