Read and write text file PHP Source Code