Warn when the file is changed using PHP or Javascript

Asked

Viewed 53 times

-4

I have a form that saves the data in a file .txt. I wonder if you have how to create a warning to know when a new content is registered in this .txt through the PHP.

1 answer

0

What Voce can do is use a Linux Cron and arrow it to run every x minutes or seconds and then Voce is checking the file. You can do this manually or use some component like this: https://github.com/peppeocchi/php-cron-scheduler

OR

If this txt is edited by some other program, Voce can create an API with PHP where the program that edited txt sends a message saying that it edited the file.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.