How do I make it so there are just so many lines in a file and everytime a line is added one is deleted. I've looked through the function lists and nothing so far
PHP does not support random-access i/o on disk files, as you might be able to do with raw Unix system calls in C. Read the file into an array, perform your surgery on the array members, and rewrite the file.