Re: Output HTML to a file

From: Date: Wed, 22 Nov 2000 17:06:09 +0000
Subject: Re: Output HTML to a file
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-26667@lists.php.net to get a copy of this message
Kevin, You can use perl to do the same task relatively easily, though you might need to install some modules on your system. Here's what I use: #!/usr/bin/perl # # Copy live/dynamic index page to static index page # use LWP::Simple; $content = get("http://mojolin.com/xml/mojolin.php"); open NEWINDEX, ">/htdocs/xml/mojolin.html"; print NEWINDEX $content; close NEWINDEX; hope that helps. Dan On Wed, 22 Nov 2000, Kevin Rose wrote: > Hello list, > > I need to capture, into a file, the HTML generated via my PHP. > > I just wanted to verify there was not an easy solution that would allow me > to redirect my output to a file (since I have the PHP page generating the > HTML and currently displaying to the browser). > > I have read the list about the setting everything into a string, then > fwriting the string. > > Just wanted to check before I go to the trouble of modifying every line in > my PHP page. > > Thanks a head of time, > Kevin > > > -- > 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 > >

« previous php.general (#26667) next »