I suggest using a MySQL database. If you don't have the luxury of a database, you could write the number of the next text file in another text file. For example, say you have txtNum.txt, and it starts with the number 1 in it. PHP opens the file, reads the 1, makes 1.txt, then writes over the 1 with a 2 in txtNum.txt for next time. Then, next time, it will take the 2 out and go through the process again.
If you have a database, though, you could eliminate the use of read/write text files altogether and just store values in an easier and more organized fashion.
Thou com'st in such a questionable shape
Hamlet, Act 1, Scene 4
Bookmarks