Outputting/saving data to a text file

Hi all

i’ve done a quick search but not had much luck

Is it possible for a CD based flash appplication to create a text file on the users hard drive in which to store session data of sorts, which it can later retrieve/modify? Would PHP, despite being a server side language, have any use here? Can anyone point me to some tutorials?