Hey, I will try to explain my situation as good as possible! Ok, let's say I have a .txt file on my website called "usernames.txt" In that file, there are usernames of my website members, every time a new member submits his username on my website, it will be saved in that "usernames.txt" file. Example on how the usernames.txt file looks like: firstname.lastname@example.org email@example.com firstname.lastname@example.org email@example.com firstname.lastname@example.org ect... Because that file gets big hourly, I have to delete the old usernames (the top = oldest) by myself.. And that sucks because when I am in school, I don't have access to my laptop so I can't delete the usernames and that causes problems on my server.. (It's hard for me to explain why, but it does make my website slower). What I want is a script or PHP code or something that automatically deletes the old usernames (Let's say the first 40 usernames at the top) and keeps the new one's in the file (Let's say the 30 usernames at the bottom) inside the "usernames.txt" file. OR a script that deletes the first usernames (at the top) every 30 minutes..So only the new usernames will be saved in the "usernames.txt" I know this question sounds wired, but the whole point is to make my server faster The file on my website is not called "usernames.txt" actually, but that is smiler to what the file is about. The file on my website saves the users Access Tokens (Facebook Graph thingy) but in the example I gave it is Usernames not Access Tokens. (Because most of the people don't even know what Access Token is, but hopefully everyone knows what Usernames are) Sorry for poor English And it's would be really really great if someone can help me Thanks!