RE: [PHP] How to catch the output of http:// -> text file?
| From: | Kraa de Simon | Date: | Thu, 03 May 2001 08:19:49 +0000 |
| Subject: | RE: [PHP] How to catch the output of http:// -> text file? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-51228@lists.php.net to get a copy of this message | ||
Thanks,
When I try:
------------------------------------------------------------
<?
$lines = join('', file("http://www.ansilion.com"));
echo $lines;
?>
------------------------------------------------------------
I get the following error:
------------------------------------------------------------
Warning: file("http://www.ansilion.com") - No
error in c:\program
files\nusphere\apache\htdocs\test.php on line 2
Warning: Bad arguments to join() in c:\program
files\nusphere\apache\htdocs\test.php on line 2
------------------------------------------------------------
Huh!?!?!
Simon.
> -----Original Message-----
> From: elias [mailto:elias_bachaalany@yahoo.com]
> Sent: donderdag 3 mei 2001 1:29
> To: php-general@lists.php.net
> Subject: Re: [PHP] How to catch the output of http:// ->
> text file?
>
>
> Never tried what i'll write you, but it should work though!
>
> for ($i=0;$i<2000;$i++)
> {
> $lines = join('', file(http://www.mysite.com/generator.php?id=$i));
> // save $lines to a file.....
> }
>
> -elias
> http://eassoft.cjb.net
>
> "Kraa de Simon" <Simon.de.Kraa@icl.nl> wrote in message
> news:C1EBEEBBB842D411B4120000949A1F5875867A@wwmessd135...
> > Hi,
> >
> > PHP newbie.
> >
> > Can anyone help me with the following?
> >
> > Pseudo code:
> >
> > for(i=1;i<2000;i++)
> > {
> > catch the output of
> > http://www.mysite.com/kb.html?kbid= <? echo i ?>
> > and put the html code in a text file called
> > /www/kb/kbid <? echo i ?> .html
> > }
> >
> > So the end result is 2000 html files on disk "extacted"
> from the http://
> > address...
> >
> > Thanks...
> >
> > Met vriendelijke groet / With kind regards,
> >
> > Simon de Kraa
> > ICL Logistic Systems
> > mailto:Simon.de.Kraa@icl.nl
> >
> > ---
> >
> > Microsoft Windows 2000 Professional SP 1, Progress 9.1b,
> Roundtable 9.1b
> > SCO UnixWare 7.1.1, Progress 9.1a11
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-general-help@lists.php.net
> > To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>