Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Quote:
|
I presume I will have to use output buffering and write it to the file somehow?
|
Exactly!
Send an ob_start() at the beginning of your script, and use an ob_get_clean() to retrieve the text in a variable.
Then, it's up to you to write it in a file, or store it in a db.
If the process needs to be site-wide, take a look at the auto_prepend_file and auto_append_file php.ini directive (you can set them up on a per-host base too, via .htaccess).
When I needed this, I did the ob_start in the prepended file, and the get_clean + storage in the append.
That way, I did not need to modify the already used scripts.
__________________
Only a biker knows why a dog sticks his head out the window.
|