So let me get this straight:
You send vars through the URL to a PHP page which creates a text-file on the fly. You have to write strings to the text-file and save it. Then you want to read the text-file into a string.
Why? Why not do it in one step and just concatenate the posted vars into a string before, or after you write the text-file? Then you don't have to read the file.
And [man]file_get_contents/man will still read any file and give you the contents/output. Whether it's dynamically created or not. So long as the file is there, it'll read it.