@xxoulmate
That is fine, but possibly a little overkill from totally automated to totally user submitted. Can you elaborate on what you're trying to do and maybe we can give you better suggestions?
If not then a simple textarea which gets processed to become a file (look up "php create file" if you're unsure) will do the trick. Just remember you really should be inspecting and sanitizing the user submitted data.
Rule #1 of PHP programming (and most user interacting languages) is trust no one!
What is in your text file you're looking for? Better than a big textarea for users to put what they want, would be a series of inputs where you can check that the data matches what it should. Checking one large text block is more involed/risky than a few smaller ones.