Hello guys.
I've been struggling for a few days now with the "God Blessed" output buffer in PHP.
Basically what I want to do is have a script open up a file, read it and instead of echoing it to the browser, buffer it and write it to another file.
What follows is a very raw idea of what is on my mind:
CODE
<?php
ob_start();
$my_file = "test_file.html";
$my_other_file = "other_file.html";
$fp = fopen($my_file, "a+") or die("can't open file);
readfile("my_file");
$content = ob_get_contents();
fflush($my_other_file);
ob_end_flush();
fclose($fp);
?>
My apologies if the code above seems an abomination, I'm really taking PHP seriously but it's been challenging and I've looked all over the net and have not been able to find something in this regard that worked.
Thanks as usual for any help that I can get.
Jnkrois.