Re: Redirecting HTML output to FILE

[email protected] (Paul Padilla) Fri, 29 Mar 2002 10:27:27 PST
Newsgroups php.lang
Organization Webimpaq
Message-ID <[email protected]>
Hi Kresimir,

Thanks for the reply but I have a PHP URL with a GET method that 
returns a page based on the parameters passed.  How do I capture the 
resulting page to a variable or to a file?

Cheers,
Paul


In article <[email protected]>, Kresimir Kondza 
wrote:

> in this case you use file functions.
> 
> first you open a file with
> $fp=fopen("local file adress","w");    // opens a file for writing
> 
> then you put some text into a var
> 
> $file_content="This is content of the file you are cretaing";
> 
> and then you print this to file
> fputs($fp,$file_content);
> 
> and you close the file
> fclose($fp);
> 
> that's it