[Javascript] Content Retrieval

Matt Barton javascript at mattbarton.org
Wed Aug 11 07:28:08 CDT 2004


You should be OK then: file_get_contents is valid in PHP 4 >= 4.3.0 and PHP
5 accoring to php.net

----- Original Message ----- 
From: "Tim Makins" <spindrift at oceanfree.net>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Wednesday, August 11, 2004 1:28 PM
Subject: Re: [Javascript] Content Retrieval


> Oh, that's nice and simple !! I can cope with the extraction OK.
>
> One question - what do you mean by 'if your php installation is older' ?
> (My host uses PHP4.3.4)
>
> Tim in Ireland.
>
> ----- Original Message ----- 
> From: "Roger Roelofs" <rer at datacompusa.com>
> To: "[JavaScript List]" <javascript at LaTech.edu>
> Sent: Wednesday, August 11, 2004 11:55 AM
> Subject: Re: OT: cURL (was Re: [Javascript] Content Retrieval)
>
>
> > Tim,
> > If you use php, curl is not necessary.
> >
> > <?php
> >
> > $var = file_get_contents("http://www.mydomain.com/index.html"); // puts
> > whole file in a string var
> >
> > // if your php installation is older you can
> >
> > $aVar = file("http://www.mydomain.com/index.html");  //puts file into
> > an array of lines
> > $var = implode("\n", $aVar);                         //concatenates
> > array into string var
> >
> > // extracting the required text is left as an exercise for the reader...
> >
> > ?>
> >
> > _______________________________________________
> > Javascript mailing list
> > Javascript at LaTech.edu
> > https://lists.LaTech.edu/mailman/listinfo/javascript
> >
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
> -- 
> This email has been verified as Virus free
> Virus Protection and more available at http://www.plus.net




More information about the Javascript mailing list