note 9877 deleted from function.ob-start by sniper

From: Date: Mon, 03 Nov 2003 15:37:20 +0000
Subject: note 9877 deleted from function.ob-start by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-59700@lists.php.net to get a copy of this message
Note Submitter: martin.kloss@gmx.de ---- If you want to create static html files from mysql results using templates in order to take some load of the database, you can use something like this to create the files: /* USING OUTPUT BUFFER AND PASSTHRU */ ob_start(); passthru("/usr/local/bin/lynx -source http://www.myserver.com/index.php?id=$id"); $html = ob_get_contents(); ob_end_clean(); // write output to file $fp = fopen("/user/.../html/$id.html", "w"); fwrite($fp, $html); fclose($fp); You could use this in an admin tool for you site, or even in a cron job (though I prefer perl for that). I hope it helps someone. Martin.

« previous php.notes (#59700) next »