Yes, all you need to do is work with the same string that you were using.
$fp = fopen("myfile", "r");
$file = fread($fp, filesize("myfile"));
fclose($fp);
// Please, call me chris
$file = str_replace("God", "Chris", $file);
// Replace all w's with u's
$file = str_replace("w", "u", $file);
// Now write it out.
$fp = fopen("myfile2", "w");
fwrite($fp, $file);
fclose($fp);
All done! You can do a replace on the string as many times as you want before you write the file back out.
Chris King